{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "authorship_tag": "ABX9TyP+GoiWT7iWvo0SM69qWNA+",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/hengjiUSTC/learn-llm/blob/main/learn_nanogpt.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "VhnOqzbRiXUr",
        "outputId": "6c187e33-a206-4352-fc05-13b030699409"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Cloning into 'chinese-poetry'...\n",
            "remote: Enumerating objects: 7309, done.\u001b[K\n",
            "remote: Counting objects: 100% (114/114), done.\u001b[K\n",
            "remote: Compressing objects: 100% (91/91), done.\u001b[K\n",
            "remote: Total 7309 (delta 38), reused 78 (delta 20), pack-reused 7195\u001b[K\n",
            "Receiving objects: 100% (7309/7309), 199.68 MiB | 16.29 MiB/s, done.\n",
            "Resolving deltas: 100% (5326/5326), done.\n",
            "Updating files: 100% (2285/2285), done.\n"
          ]
        }
      ],
      "source": [
        "!git clone https://github.com/chinese-poetry/chinese-poetry.git"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "def process_data():\n",
        "  # read all json data from lunyu.json and save as txt\n",
        "\n",
        "  import glob\n",
        "  import json\n",
        "\n",
        "  datas_json=glob.glob(\"chinese-poetry/宋词/ci.song*.json\") #1匹配所有唐诗json文件\n",
        "\n",
        "  # Function to process the JSON and write to a text file\n",
        "  def process_json_to_text(json_file, text_file):\n",
        "      with open(json_file, 'r', encoding='utf-8') as file:\n",
        "          data = json.load(file)\n",
        "\n",
        "      with open(text_file, 'a', encoding='utf-8') as file:\n",
        "          for chapter in data:\n",
        "              file.write(chapter['author'] + '\\n')  # Write the chapter title\n",
        "              file.write(chapter['rhythmic'] + '\\n')  # Write the chapter title\n",
        "              for paragraph in chapter['paragraphs']:\n",
        "                  file.write(paragraph + '\\n')  # Write each paragraph\n",
        "              file.write('\\n')  # Add a new line after each chapter for readability\n",
        "\n",
        "  # Save all data into a single txt file\n",
        "  for data in datas_json:\n",
        "      process_json_to_text(data, 'input_songci.txt')\n",
        "process_data()"
      ],
      "metadata": {
        "id": "mxtMOV-kiglB"
      },
      "execution_count": 2,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "#build training and test dictionary\n",
        "import os\n",
        "import pickle\n",
        "import requests\n",
        "import numpy as np\n",
        "\n",
        "# download the tiny shakespeare dataset\n",
        "input_file_path = 'input_songci.txt'\n",
        "\n",
        "with open(input_file_path, 'r') as f:\n",
        "    data = f.read()\n",
        "print(f\"length of dataset in characters: {len(data):,}\")\n",
        "\n",
        "# get all the unique characters that occur in this text\n",
        "chars = sorted(list(set(data)))\n",
        "vocab_size = len(chars)\n",
        "print(f\"vocab size: {vocab_size:,}\")\n",
        "\n",
        "# create a mapping from characters to integers\n",
        "stoi = { ch:i for i,ch in enumerate(chars) }\n",
        "itos = { i:ch for i,ch in enumerate(chars) }\n",
        "def encode(s):\n",
        "    return [stoi[c] for c in s] # encoder: take a string, output a list of integers\n",
        "def decode(l):\n",
        "    return ''.join([itos[i] for i in l]) # decoder: take a list of integers, output a string\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "r9ZsUwiCjB-f",
        "outputId": "f3b6b2d3-df40-4572-a7c0-a340a5abeef7"
      },
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "length of dataset in characters: 2,060,405\n",
            "vocab size: 6,143\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import torch # we use PyTorch: https://pytorch.org\n",
        "data = torch.tensor(encode(data), dtype=torch.long)\n",
        "print(data.shape, data.dtype)\n",
        "print(data[:1000]) # the 1000 characters we looked at earier will to the GPT look like this\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "yvHfP5B1jpss",
        "outputId": "e98f7285-2e5a-40c7-b2d6-45ccda102914"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "torch.Size([2060405]) torch.int64\n",
            "tensor([6083, 4742,    0, 2823, 1218,  353,    0, 2626, 2905, 5406,  574, 1231,\n",
            "        1078,  885,   26,    0, 2960,  144, 2071, 1272, 1025, 1338,  531,   26,\n",
            "           0, 3885, 1795,  861,  873,  210,   79, 2593,   26,    0, 3100,  651,\n",
            "         797,   26,    0, 1648, 1682,   78, 1618,  440, 5789, 4226,   26,    0,\n",
            "        2415,  432, 5935, 5905,  239,  995, 1225,   26,    0, 3189, 3232, 3487,\n",
            "          76, 3713,  170, 3436,   26,    0, 5230, 2206, 1461, 1231, 1212,  229,\n",
            "        2617,   26,    0, 3976, 2241, 3850,   26,    0,  124, 5782,  597,   77,\n",
            "         170, 5539,   85,   26,    0,    0, 6083, 4742,    0, 2823, 1218,  353,\n",
            "           0,  170,  881, 2240,   98, 1217, 2623, 5208,   26,    0,  190, 2489,\n",
            "         124, 1566, 3601, 5782,  279,   26,    0, 1231,  294, 1400, 1530, 3497,\n",
            "          76, 3908,   26,    0, 4692, 2257, 4065,   26,    0, 3314, 3665, 3654,\n",
            "        1510, 3402, 1621, 1625,   26,    0, 5740,  294, 1127, 1106, 1263, 2241,\n",
            "        1635,   26,    0, 5148, 5792,  657,   76, 2816,  379, 5135,   26,    0,\n",
            "        1231, 4419, 2313, 1017, 3713, 1120, 1100,   26,    0,  170,  478, 1216,\n",
            "          26,    0, 2103, 1050, 2231, 1177, 5452,  574, 2737,   26,    0,    0,\n",
            "        6083, 4742,    0, 2823, 1218,  353,    0,   75, 2240, 3601,  379,  179,\n",
            "        1004,  573,   26,    0,   70, 1454,  170, 3063,  179,  859, 2885,   26,\n",
            "           0, 4404, 2057, 3701, 2555, 1220, 2155, 2071,   26,    0, 5740,  667,\n",
            "        3157,   26,    0, 1089, 1109, 4799, 3698,  170, 2129,  225,   26,    0,\n",
            "        1845, 1272, 5406, 3827, 2283, 3524, 2623,   26,    0, 5378,  678, 4404,\n",
            "         244, 1245, 1435, 3412,   26,    0, 1400, 5196,   98, 1009, 2537, 2257,\n",
            "        2101,   26,    0, 5205,  667,  660,   26,    0, 2141, 1682, 1400,  672,\n",
            "        2152, 2253, 1924,   26,    0,    0, 4457, 4150,  199,    0, 4499, 1297,\n",
            "        2865,    0,  459, 5529, 4775, 3698,   26,    0,  569, 5402, 5520, 1190,\n",
            "        5268,   26,    0,   78, 3276, 1510, 3594,  991, 6133,  279, 3357, 4382,\n",
            "          25,  568, 2728,   75, 1312,   26,    0, 3286, 4259, 3178, 3744, 6133,\n",
            "        4333, 2258, 2617, 5782,  440, 6133, 5614, 2354, 1324, 6133, 2454,  652,\n",
            "         170, 6133, 2194,   79,  170,  303, 1045,   26,    0, 1470,  814, 4781,\n",
            "        2185, 6133, 3148, 2584, 3274, 2816, 2181,   26,    0, 2561, 2166, 1058,\n",
            "        1454, 2141, 6133, 2563, 1820, 2152,   25, 4904, 5115, 5740, 2135,   26,\n",
            "           0, 5147, 5130, 4129,  256, 6133, 2103, 5239,  454, 2555,  859, 6133,\n",
            "        1648, 3916, 5403, 6133, 1540, 4692, 5148, 6133,  825, 1463, 3472, 1003,\n",
            "        1257,   26,    0,    0, 4457, 4150,  199,    0, 4775, 2631, 2240,    0,\n",
            "        4277, 2229, 5378, 2555, 5406, 3973, 6133, 2262, 5529, 5905, 4095, 5458,\n",
            "        3159,   26,    0,   98, 1009, 2468, 4782,  396, 5072, 2045,   26,    0,\n",
            "        5792, 3855, 4451, 4304, 2161, 2185,   26,    0,  234, 2160, 3959, 5575,\n",
            "        2262, 1787, 6133, 2092, 1864, 3845, 3908, 2666, 2851,   26,    0, 5468,\n",
            "        5440,  574, 2476,  146,  144, 5539,   26,    0, 1033, 1033, 4608, 6124,\n",
            "        1166, 3958,   26,    0,    0, 4457, 4150,  199,    0, 4775, 2631, 2240,\n",
            "           0, 5695, 5706, 2092, 3880, 1427, 2354, 6133, 3189, 3232, 2781, 3959,\n",
            "        1453, 2400,   26,    0,  170,  881, 4304, 2240, 4781, 2103, 1057,   26,\n",
            "           0,   78, 2076, 2631,  581, 4317, 1256,   26,    0, 1647, 1225, 5792,\n",
            "        4304, 4504, 4504, 6133, 1682, 5614, 2735, 2617, 5212, 5212,   26,    0,\n",
            "        5966, 5953, 5782, 5228, 2256,  395, 2398,   26,    0,  859, 2439, 4374,\n",
            "        6014, 1841, 2181,   26,    0,    0, 4457, 4150,  199,    0, 4775, 2631,\n",
            "        2240,    0, 2816, 2512, 1400, 3274, 2171, 1224, 6133, 1175, 4304, 1261,\n",
            "        4694, 2161, 5824,   26,    0, 4949, 1465, 3729, 3788, 3047,  947, 4571,\n",
            "          26,    0,  478, 5196, 2185,  440, 1576, 5646,   26,    0,  882, 3245,\n",
            "        2103, 2283,  554, 4318, 6133, 5957, 5953, 2257,  444,   90,  686,   26,\n",
            "           0, 1926, 4798, 3880, 4714, 5238, 5838, 4129,   26,    0,   78, 2752,\n",
            "        4057, 6124, 2999, 3973,   26,    0,    0, 4457, 4150,  199,    0, 4775,\n",
            "        2631, 2240,    0, 3220,  406, 5838,  144, 5148, 4709, 6133,  574,  947,\n",
            "        3937, 1444,  234,  915,   26,    0,  170, 3274,   72,  568, 1261,  106,\n",
            "        3621,   26,    0,  430, 2166, 5428, 3241, 2103, 1302,   26,    0, 3357,\n",
            "         283, 5678, 2410, 3361, 3374, 6133, 2152, 5559, 3880, 4390, 4305, 4432,\n",
            "          26,    0, 1009, 2066, 3410, 1247, 5196, 2254, 5757,   26,    0, 1435,\n",
            "        1243, 5782,  379, 2650, 5378,   26,    0,    0, 4457, 4150,  199,    0,\n",
            "        2751, 2865, 2657,    0, 2468, 1163,  546, 5406, 3026, 3427, 2103,   26,\n",
            "           0, 5838, 2380, 3100, 1427, 1461, 5606, 1260,   26,    0, 4072, 5577,\n",
            "          78, 4042, 1944,  926, 2161,   26,    0,   78,  466,   79, 4304,  106,\n",
            "        5201,  261, 6133, 5630, 3271, 2867, 2726, 5020, 5537,  170,   26,    0,\n",
            "        1047, 4041, 1047, 1625, 3112,  681, 5775,   26,    0,    0, 4457, 4150,\n",
            "         199,    0, 4572, 4037,  170,    0,   75, 1454, 2236,   78, 3672,  863,\n",
            "        2368,   26,    0, 5177, 4330, 4443, 3665, 2214,   26,    0, 1626, 2283,\n",
            "        2083, 4810, 2885, 2816, 2141,   26,    0, 2358,  657,  131, 2575, 3100,\n",
            "        4222,   25, 2131,  103, 2632,   26,    0, 2161, 3601, 2103, 1177,  576,\n",
            "        3871, 5674,   26,    0, 6083,  599, 4102,  957, 4879,   26,    0, 1218,\n",
            "         170,   78, 3276, 1225, 6127, 4859,   26,    0, 4684, 3412,  570, 1453,\n",
            "        2468, 1001,   25,  553, 6124, 1530,   26,    0,    0, 4457, 4150,  199,\n",
            "           0, 4572, 4037,  170,    0,   70, 5137,  105, 2386, 3659, 3661, 2368,\n",
            "          26,    0,  379, 2194, 3315, 5683, 2214,   26,    0, 1009,  392, 4456,\n",
            "        1718,  881,  403, 2141,   26,    0, 1811, 1272, 1576,  144, 2987, 3960,\n",
            "          25, 1287, 2816, 2632,   26,    0, 2511,  496, 5406, 1030, 2129, 2191,\n",
            "        5674,   26,    0,  647, 2241,  675, 1789, 4879,   26,    0, 5877, 5864,\n",
            "        1206, 4404, 5007, 1530, 4859,   26,    0,   90, 5268, 3298, 5210, 1470,\n",
            "        5007,   25,   78, 1486, 1530,   26,    0,    0, 4457, 4150,  199,    0,\n",
            "        3220, 6058, 6020,    0, 2960,  144, 2542, 5281, 5406, 5782, 4226,   26,\n",
            "           0, 3597, 2613,  376, 5548,  478, 5591, 3220,   26,    0,  620, 1218,\n",
            "          71,  194,  597, 1530, 2283, 6133, 5205, 3047, 1673, 1518, 1531, 2131,\n",
            "         885,   26,    0, 5406, 3682, 3848, 3952, 5115, 4382, 4991,   26,    0,\n",
            "        1247, 3588, 1009,  350, 2151,  625, 2989,   26,    0, 1626, 2283,   70,\n",
            "        1302,  857, 5191, 1197, 6133, 5205, 5196, 1531, 3274,  374, 1010, 1302,\n",
            "          26,    0,    0, 4457, 4150,  199,    0, 6042, 2400,  190,    0, 6042,\n",
            "        2400,  190,  340, 6133])\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "batch_size = 12 # how many independent sequences will we process in parallel?\n",
        "block_size = 64 # what is the maximum context length for predictions?\n",
        "device = 'cuda'\n",
        "vocab_size = vocab_size\n",
        "eval_interval = 200\n",
        "eval_iters = 200\n",
        "print(f'batch size: {batch_size}\\nblock_size:{block_size}\\nvocab_size:{vocab_size} ')"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "SLNjGxMQliYt",
        "outputId": "9eb33d9c-0766-4922-dee1-2eb80923e1f2"
      },
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "batch size: 12\n",
            "block_size:64\n",
            "vocab_size:6143 \n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "n = int(0.9*len(data)) # first 90% will be train, rest val\n",
        "train_data = data[:n]\n",
        "val_data = data[n:]\n",
        "train_data[:block_size+1]"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "e8gUgHOHlu-e",
        "outputId": "c0b677b8-3521-4048-a650-8e94104aad71"
      },
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "tensor([6083, 4742,    0, 2823, 1218,  353,    0, 2626, 2905, 5406,  574, 1231,\n",
              "        1078,  885,   26,    0, 2960,  144, 2071, 1272, 1025, 1338,  531,   26,\n",
              "           0, 3885, 1795,  861,  873,  210,   79, 2593,   26,    0, 3100,  651,\n",
              "         797,   26,    0, 1648, 1682,   78, 1618,  440, 5789, 4226,   26,    0,\n",
              "        2415,  432, 5935, 5905,  239,  995, 1225,   26,    0, 3189, 3232, 3487,\n",
              "          76, 3713,  170, 3436,   26])"
            ]
          },
          "metadata": {},
          "execution_count": 6
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "torch.manual_seed(1337)\n",
        "\n",
        "# data loading\n",
        "def get_batch(split):\n",
        "    # generate a small batch of data of inputs x and targets y\n",
        "    data = train_data if split == 'train' else val_data\n",
        "    ix = torch.randint(len(data) - block_size, (batch_size,))\n",
        "    x = torch.stack([data[i:i+block_size] for i in ix])\n",
        "    y = torch.stack([data[i+1:i+block_size+1] for i in ix])\n",
        "    x, y = x.to(device), y.to(device)\n",
        "    return x, y\n",
        "\n",
        "xb, yb = get_batch('train')\n",
        "print('inputs:')\n",
        "print(xb.shape)\n",
        "print(xb)\n",
        "print('targets:')\n",
        "print(yb.shape)\n",
        "print(yb)\n",
        "\n",
        "print('----')\n",
        "for b in range(batch_size): # batch dimension\n",
        "    for t in range(block_size): # time dimension\n",
        "        context = xb[b, :t+1]\n",
        "        target = yb[b,t]\n",
        "        print(f\"input text {decode(context.tolist())}\\noutput {decode([target.tolist()])}\")\n",
        "        print(f\"when input is {context.tolist()} the target: {target}\")\n",
        "        print('\\n')"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "N0CY3-R8l8ES",
        "outputId": "c4bde369-d068-4bd5-b5c4-5b4740cb0c29"
      },
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[1;30;43mStreaming output truncated to the last 5000 lines.\u001b[0m\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "output \n",
            "\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "\n",
            "output 山\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0] the target: 1297\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山\n",
            "output 万\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297] the target: 73\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万\n",
            "output 叠\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73] the target: 639\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠\n",
            "output ，\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639] the target: 6133\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，\n",
            "output 水\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133] the target: 2617\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水\n",
            "output 千\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617] the target: 569\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千\n",
            "output 重\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569] the target: 5403\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重\n",
            "output 。\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403] the target: 26\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "output \n",
            "\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "\n",
            "output 一\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0] the target: 70\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一\n",
            "output 叶\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70] the target: 657\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶\n",
            "output 漫\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657] the target: 2905\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫\n",
            "output 题\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905] the target: 5764\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫题\n",
            "output 红\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905, 5764] the target: 3880\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫题红\n",
            "output 。\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905, 5764, 3880] the target: 26\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫题红。\n",
            "output \n",
            "\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905, 5764, 3880, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫题红。\n",
            "\n",
            "output 忽\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905, 5764, 3880, 26, 0] the target: 1607\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫题红。\n",
            "忽\n",
            "output 忽\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905, 5764, 3880, 26, 0, 1607] the target: 1607\n",
            "\n",
            "\n",
            "input text \n",
            "睡起鸾钗亸，金约鬓影胧□\n",
            "桅佩冷，玉丁东。\n",
            "镜里对芙蓉。\n",
            "秦筝倦理梁尘暗，惆怅燕子楼空。\n",
            "山万叠，水千重。\n",
            "一叶漫题红。\n",
            "忽忽\n",
            "output 。\n",
            "when input is [0, 3436, 5033, 6031, 5429, 168, 6133, 5406, 3883, 5921, 1546, 4156, 23, 0, 2389, 249, 432, 6133, 3148, 71, 90, 26, 0, 5508, 5402, 1243, 4290, 4489, 26, 0, 3609, 3728, 320, 3188, 2409, 1260, 2208, 6133, 1683, 1612, 3047, 1163, 2468, 3654, 26, 0, 1297, 73, 639, 6133, 2617, 569, 5403, 26, 0, 70, 657, 2905, 5764, 3880, 26, 0, 1607, 1607] the target: 26\n",
            "\n",
            "\n",
            "input text 裂\n",
            "output 白\n",
            "when input is [4726] the target: 3358\n",
            "\n",
            "\n",
            "input text 裂白\n",
            "output 麻\n",
            "when input is [4726, 3358] the target: 6080\n",
            "\n",
            "\n",
            "input text 裂白麻\n",
            "output ，\n",
            "when input is [4726, 3358, 6080] the target: 6133\n",
            "\n",
            "\n",
            "input text 裂白麻，\n",
            "output 曾\n",
            "when input is [4726, 3358, 6080, 6133] the target: 2236\n",
            "\n",
            "\n",
            "input text 裂白麻，曾\n",
            "output 涂\n",
            "when input is [4726, 3358, 6080, 6133, 2236] the target: 2762\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂\n",
            "output 墨\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762] the target: 980\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨\n",
            "output 敕\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980] the target: 2064\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕\n",
            "output ，\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064] the target: 6133\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，\n",
            "output 谪\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133] the target: 4929\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪\n",
            "output 堕\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929] the target: 951\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕\n",
            "output 俄\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951] the target: 281\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄\n",
            "output 徵\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281] the target: 1578\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵\n",
            "output 起\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578] the target: 5033\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起\n",
            "output 。\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033] the target: 26\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "output \n",
            "\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "\n",
            "output 鼎\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0] the target: 6102\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎\n",
            "output 湖\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102] the target: 2843\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖\n",
            "output 龙\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843] the target: 6124\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙\n",
            "output 去\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124] the target: 620\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去\n",
            "output ，\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620] the target: 6133\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，\n",
            "output 老\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133] the target: 4076\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老\n",
            "output 臣\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076] the target: 4220\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣\n",
            "output 何\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220] the target: 239\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何\n",
            "output 以\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239] the target: 195\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以\n",
            "output 堪\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195] the target: 957\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪\n",
            "output 此\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957] the target: 2562\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此\n",
            "output 。\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562] the target: 26\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "output \n",
            "\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "\n",
            "output 回\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0] the target: 859\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回\n",
            "output 首\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859] the target: 5835\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首\n",
            "output 当\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835] the target: 1531\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当\n",
            "output 日\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531] the target: 2131\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日\n",
            "output 遭\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131] the target: 5275\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭\n",
            "output 逢\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275] the target: 5251\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢\n",
            "output ，\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251] the target: 6133\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，\n",
            "output 譬\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133] the target: 4819\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬\n",
            "output 如\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819] the target: 1047\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如\n",
            "output 春\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047] the target: 2161\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春\n",
            "output 梦\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161] the target: 2415\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦\n",
            "output ，\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415] the target: 6133\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，\n",
            "output 误\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133] the target: 4881\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误\n",
            "output 入\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881] the target: 389\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入\n",
            "output 华\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389] the target: 574\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华\n",
            "output 胥\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574] the target: 4155\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥\n",
            "output 里\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155] the target: 5402\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里\n",
            "output 。\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402] the target: 26\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "output \n",
            "\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "\n",
            "output 推\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0] the target: 1952\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推\n",
            "output 枕\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952] the target: 2308\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕\n",
            "output 黄\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308] the target: 6083\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄\n",
            "output 粱\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083] the target: 3821\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱\n",
            "output 犹\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821] the target: 3100\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹\n",
            "output 未\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100] the target: 2257\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未\n",
            "output 熟\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257] the target: 3037\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟\n",
            "output ，\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037] the target: 6133\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，\n",
            "output 封\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133] the target: 1248\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封\n",
            "output 拜\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248] the target: 1870\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜\n",
            "output 几\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870] the target: 448\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜几\n",
            "output 王\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870, 448] the target: 3149\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜几王\n",
            "output 侯\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870, 448, 3149] the target: 277\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜几王侯\n",
            "output 矣\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870, 448, 3149, 277] the target: 3471\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜几王侯矣\n",
            "output 。\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870, 448, 3149, 277, 3471] the target: 26\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜几王侯矣。\n",
            "output \n",
            "\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870, 448, 3149, 277, 3471, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 裂白麻，曾涂墨敕，谪堕俄徵起。\n",
            "鼎湖龙去，老臣何以堪此。\n",
            "回首当日遭逢，譬如春梦，误入华胥里。\n",
            "推枕黄粱犹未熟，封拜几王侯矣。\n",
            "\n",
            "output 似\n",
            "when input is [4726, 3358, 6080, 6133, 2236, 2762, 980, 2064, 6133, 4929, 951, 281, 1578, 5033, 26, 0, 6102, 2843, 6124, 620, 6133, 4076, 4220, 239, 195, 957, 2562, 26, 0, 859, 5835, 1531, 2131, 5275, 5251, 6133, 4819, 1047, 2161, 2415, 6133, 4881, 389, 574, 4155, 5402, 26, 0, 1952, 2308, 6083, 3821, 3100, 2257, 3037, 6133, 1248, 1870, 448, 3149, 277, 3471, 26, 0] the target: 229\n",
            "\n",
            "\n",
            "input text 知\n",
            "output 何\n",
            "when input is [3472] the target: 239\n",
            "\n",
            "\n",
            "input text 知何\n",
            "output 许\n",
            "when input is [3472, 239] the target: 4839\n",
            "\n",
            "\n",
            "input text 知何许\n",
            "output 。\n",
            "when input is [3472, 239, 4839] the target: 26\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "output \n",
            "\n",
            "when input is [3472, 239, 4839, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "\n",
            "output 但\n",
            "when input is [3472, 239, 4839, 26, 0] the target: 232\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但\n",
            "output 姑\n",
            "when input is [3472, 239, 4839, 26, 0, 232] the target: 1075\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑\n",
            "output 苏\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075] the target: 4317\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏\n",
            "output 台\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317] the target: 652\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台\n",
            "output 下\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652] the target: 77\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下\n",
            "output ，\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77] the target: 6133\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，\n",
            "output 有\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133] the target: 2241\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有\n",
            "output 苍\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241] the target: 4315\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍\n",
            "output 然\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315] the target: 3017\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然\n",
            "output 平\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017] the target: 1453\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平\n",
            "output 楚\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453] the target: 2454\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚\n",
            "output 。\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454] the target: 26\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "output \n",
            "\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "\n",
            "output 人\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0] the target: 170\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人\n",
            "output 笑\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170] the target: 3698\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑\n",
            "output 此\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698] the target: 2562\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此\n",
            "output 翁\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562] the target: 4051\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁\n",
            "output ，\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051] the target: 6133\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，\n",
            "output 又\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133] the target: 625\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又\n",
            "output 来\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625] the target: 2283\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来\n",
            "output 访\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283] the target: 4845\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访\n",
            "output 古\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845] the target: 642\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古\n",
            "output 。\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642] the target: 26\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "output \n",
            "\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "\n",
            "output 况\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0] the target: 430\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况\n",
            "output 五\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430] the target: 146\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五\n",
            "output 湖\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146] the target: 2843\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖\n",
            "output 、\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843] the target: 25\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、\n",
            "output 元\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25] the target: 374\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元\n",
            "output 自\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374] the target: 4222\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自\n",
            "output 有\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222] the target: 2241\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有\n",
            "output ，\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241] the target: 6133\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，\n",
            "output 扁\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133] the target: 1791\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁\n",
            "output 舟\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791] the target: 4244\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟\n",
            "output 祖\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244] the target: 3563\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖\n",
            "output 武\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563] the target: 2564\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武\n",
            "output 。\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564] the target: 26\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "output \n",
            "\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "\n",
            "output 记\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0] the target: 4832\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记\n",
            "output 沧\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832] the target: 2666\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧\n",
            "output 洲\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666] the target: 2728\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲\n",
            "output 、\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728] the target: 25\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、\n",
            "output 白\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25] the target: 3358\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白\n",
            "output 鸥\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358] the target: 6017\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥\n",
            "output 伴\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017] the target: 225\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴\n",
            "output 侣\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225] the target: 269\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣\n",
            "output 。\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269] the target: 26\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "output \n",
            "\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "\n",
            "output 叹\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0] the target: 660\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹\n",
            "output 年\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660] the target: 1454\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年\n",
            "output 来\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454] the target: 2283\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来\n",
            "output 、\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283] the target: 25\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、\n",
            "output 孤\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25] the target: 1175\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤\n",
            "output 负\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175] the target: 4970\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤负\n",
            "output 了\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175, 4970] the target: 137\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤负了\n",
            "output ，\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175, 4970, 137] the target: 6133\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤负了，\n",
            "output 一\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175, 4970, 137, 6133] the target: 70\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤负了，一\n",
            "output 蓑\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175, 4970, 137, 6133, 70] the target: 4493\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤负了，一蓑\n",
            "output 烟\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175, 4970, 137, 6133, 70, 4493] the target: 2999\n",
            "\n",
            "\n",
            "input text 知何许。\n",
            "但姑苏台下，有苍然平楚。\n",
            "人笑此翁，又来访古。\n",
            "况五湖、元自有，扁舟祖武。\n",
            "记沧洲、白鸥伴侣。\n",
            "叹年来、孤负了，一蓑烟\n",
            "output 雨\n",
            "when input is [3472, 239, 4839, 26, 0, 232, 1075, 4317, 652, 77, 6133, 2241, 4315, 3017, 1453, 2454, 26, 0, 170, 3698, 2562, 4051, 6133, 625, 2283, 4845, 642, 26, 0, 430, 146, 2843, 25, 374, 4222, 2241, 6133, 1791, 4244, 3563, 2564, 26, 0, 4832, 2666, 2728, 25, 3358, 6017, 225, 269, 26, 0, 660, 1454, 2283, 25, 1175, 4970, 137, 6133, 70, 4493, 2999] the target: 5646\n",
            "\n",
            "\n",
            "input text 暝\n",
            "output ，\n",
            "when input is [2210] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，\n",
            "output 尘\n",
            "when input is [2210, 6133] the target: 1260\n",
            "\n",
            "\n",
            "input text 暝，尘\n",
            "output 波\n",
            "when input is [2210, 6133, 1260] the target: 2694\n",
            "\n",
            "\n",
            "input text 暝，尘波\n",
            "output 澹\n",
            "when input is [2210, 6133, 1260, 2694] the target: 2936\n",
            "\n",
            "\n",
            "input text 暝，尘波澹\n",
            "output 绿\n",
            "when input is [2210, 6133, 1260, 2694, 2936] the target: 3959\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿\n",
            "output 无\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959] the target: 2129\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无\n",
            "output 痕\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129] the target: 3332\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕\n",
            "output 。\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332] the target: 26\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "output \n",
            "\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "output \n",
            "\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0] the target: 0\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "\n",
            "output 吴\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0] the target: 686\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴\n",
            "output 文\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686] the target: 2083\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文\n",
            "output 英\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083] the target: 4331\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "output \n",
            "\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331] the target: 0\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "\n",
            "output 三\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0] the target: 75\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三\n",
            "output 部\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75] the target: 5323\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部\n",
            "output 乐\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323] the target: 121\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "output \n",
            "\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121] the target: 0\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "\n",
            "output 江\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0] the target: 2631\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江\n",
            "output 鶃\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631] the target: 5993\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃\n",
            "output 初\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993] the target: 478\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初\n",
            "output 飞\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478] the target: 5792\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞\n",
            "output ，\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，\n",
            "output 荡\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133] the target: 4381\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡\n",
            "output 万\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381] the target: 73\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万\n",
            "output 里\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73] the target: 5402\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里\n",
            "output 素\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402] the target: 3845\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素\n",
            "output 云\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845] the target: 144\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云\n",
            "output ，\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，\n",
            "output 际\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133] the target: 5584\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际\n",
            "output 空\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584] the target: 3654\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空\n",
            "output 如\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654] the target: 1047\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如\n",
            "output 沐\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047] the target: 2654\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐\n",
            "output 。\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654] the target: 26\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "output \n",
            "\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "\n",
            "output 咏\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0] the target: 718\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏\n",
            "output 情\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718] the target: 1682\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情\n",
            "output 吟\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682] the target: 678\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟\n",
            "output 思\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678] the target: 1621\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思\n",
            "output ，\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，\n",
            "output 不\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133] the target: 78\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不\n",
            "output 在\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78] the target: 881\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在\n",
            "output 秦\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881] the target: 3609\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦\n",
            "output 筝\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609] the target: 3728\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝\n",
            "output 金\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728] the target: 5406\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金\n",
            "output 屋\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406] the target: 1281\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋\n",
            "output 。\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281] the target: 26\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "output \n",
            "\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "\n",
            "output 夜\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0] the target: 1004\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜\n",
            "output 潮\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004] the target: 2919\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮\n",
            "output 上\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919] the target: 76\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上\n",
            "output ，\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，\n",
            "output 明\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133] the target: 2152\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明\n",
            "output 月\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152] the target: 2240\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月\n",
            "output 芦\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240] the target: 4296\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦\n",
            "output 花\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296] the target: 4304\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花\n",
            "output ，\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，\n",
            "output 傍\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133] the target: 347\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，傍\n",
            "output 钓\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133, 347] the target: 5428\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，傍钓\n",
            "output 蓑\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133, 347, 5428] the target: 4493\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，傍钓蓑\n",
            "output 梦\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133, 347, 5428, 4493] the target: 2415\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，傍钓蓑梦\n",
            "output 远\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133, 347, 5428, 4493, 2415] the target: 5208\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，傍钓蓑梦远\n",
            "output ，\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133, 347, 5428, 4493, 2415, 5208] the target: 6133\n",
            "\n",
            "\n",
            "input text 暝，尘波澹绿无痕。\n",
            "\n",
            "吴文英\n",
            "三部乐\n",
            "江鶃初飞，荡万里素云，际空如沐。\n",
            "咏情吟思，不在秦筝金屋。\n",
            "夜潮上，明月芦花，傍钓蓑梦远，\n",
            "output 句\n",
            "when input is [2210, 6133, 1260, 2694, 2936, 3959, 2129, 3332, 26, 0, 0, 686, 2083, 4331, 0, 75, 5323, 121, 0, 2631, 5993, 478, 5792, 6133, 4381, 73, 5402, 3845, 144, 6133, 5584, 3654, 1047, 2654, 26, 0, 718, 1682, 678, 1621, 6133, 78, 881, 3609, 3728, 5406, 1281, 26, 0, 1004, 2919, 76, 6133, 2152, 2240, 4296, 4304, 6133, 347, 5428, 4493, 2415, 5208, 6133] the target: 643\n",
            "\n",
            "\n",
            "input text \n",
            "\n",
            "output 试\n",
            "when input is [0] the target: 4858\n",
            "\n",
            "\n",
            "input text \n",
            "试\n",
            "output 容\n",
            "when input is [0, 4858] the target: 1220\n",
            "\n",
            "\n",
            "input text \n",
            "试容\n",
            "output 老\n",
            "when input is [0, 4858, 1220] the target: 4076\n",
            "\n",
            "\n",
            "input text \n",
            "试容老\n",
            "output 子\n",
            "when input is [0, 4858, 1220, 4076] the target: 1163\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子\n",
            "output 婆\n",
            "when input is [0, 4858, 1220, 4076, 1163] the target: 1119\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆\n",
            "output 娑\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119] the target: 1102\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑\n",
            "output 。\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102] the target: 26\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "output \n",
            "\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "\n",
            "output 恍\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0] the target: 1636\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍\n",
            "output 身\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636] the target: 5115\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身\n",
            "output 在\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115] the target: 881\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在\n",
            "output 广\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881] the target: 1461\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广\n",
            "output 寒\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461] the target: 1231\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒\n",
            "output 仙\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231] the target: 190\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙\n",
            "output 子\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190] the target: 1163\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子\n",
            "output 家\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163] the target: 1218\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家\n",
            "output 。\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218] the target: 26\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "output \n",
            "\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "\n",
            "output 任\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0] the target: 202\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任\n",
            "output 殷\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202] the target: 2583\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷\n",
            "output 勤\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583] the target: 541\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤\n",
            "output 唤\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541] the target: 761\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤\n",
            "output 酒\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761] the target: 5352\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒\n",
            "output ，\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352] the target: 6133\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，\n",
            "output 恣\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133] the target: 1644\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣\n",
            "output 从\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644] the target: 182\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从\n",
            "output 君\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182] the target: 675\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君\n",
            "output 赏\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675] the target: 5011\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏\n",
            "output ，\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011] the target: 6133\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，\n",
            "output 徘\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133] the target: 1567\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘\n",
            "output 徊\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567] the target: 1560\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊\n",
            "output 待\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560] the target: 1556\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待\n",
            "output 月\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556] the target: 2240\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月\n",
            "output ，\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240] the target: 6133\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，\n",
            "output 剩\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133] the target: 505\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩\n",
            "output 向\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505] the target: 672\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向\n",
            "output 人\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672] the target: 170\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人\n",
            "output 夸\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170] the target: 1019\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸\n",
            "output 。\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019] the target: 26\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "output \n",
            "\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "\n",
            "output 我\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0] the target: 1774\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我\n",
            "output 有\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774] the target: 2241\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有\n",
            "output 家\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241] the target: 1218\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家\n",
            "output 林\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218] the target: 2309\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林\n",
            "output ，\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309] the target: 6133\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，\n",
            "output 旧\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133] the target: 2133\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧\n",
            "output 栽\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133] the target: 2382\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽\n",
            "output 岩\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382] the target: 1317\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩\n",
            "output 壑\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317] the target: 984\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑\n",
            "output ，\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984] the target: 6133\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，\n",
            "output 得\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133] the target: 1566\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得\n",
            "output 归\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566] the target: 1530\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归\n",
            "output 去\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530] the target: 620\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去\n",
            "output 相\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620] the target: 3402\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相\n",
            "output 延\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402] the target: 1495\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延\n",
            "output 方\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495] the target: 2106\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方\n",
            "output 是\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106] the target: 2166\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是\n",
            "output 佳\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166] the target: 252\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是佳\n",
            "output 。\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166, 252] the target: 26\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是佳。\n",
            "output \n",
            "\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166, 252, 26] the target: 0\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是佳。\n",
            "\n",
            "output 姑\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166, 252, 26, 0] the target: 1075\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是佳。\n",
            "姑\n",
            "output 先\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166, 252, 26, 0, 1075] the target: 378\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是佳。\n",
            "姑先\n",
            "output 约\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166, 252, 26, 0, 1075, 378] the target: 3883\n",
            "\n",
            "\n",
            "input text \n",
            "试容老子婆娑。\n",
            "恍身在广寒仙子家。\n",
            "任殷勤唤酒，恣从君赏，徘徊待月，剩向人夸。\n",
            "我有家林，旧栽岩壑，得归去相延方是佳。\n",
            "姑先约\n",
            "output ，\n",
            "when input is [0, 4858, 1220, 4076, 1163, 1119, 1102, 26, 0, 1636, 5115, 881, 1461, 1231, 190, 1163, 1218, 26, 0, 202, 2583, 541, 761, 5352, 6133, 1644, 182, 675, 5011, 6133, 1567, 1560, 1556, 2240, 6133, 505, 672, 170, 1019, 26, 0, 1774, 2241, 1218, 2309, 6133, 2133, 2382, 1317, 984, 6133, 1566, 1530, 620, 3402, 1495, 2106, 2166, 252, 26, 0, 1075, 378, 3883] the target: 6133\n",
            "\n",
            "\n",
            "input text 篘\n",
            "output 白\n",
            "when input is [3769] the target: 3358\n",
            "\n",
            "\n",
            "input text 篘白\n",
            "output 酒\n",
            "when input is [3769, 3358] the target: 5352\n",
            "\n",
            "\n",
            "input text 篘白酒\n",
            "output 冷\n",
            "when input is [3769, 3358, 5352] the target: 432\n",
            "\n",
            "\n",
            "input text 篘白酒冷\n",
            "output 偏\n",
            "when input is [3769, 3358, 5352, 432] the target: 333\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏\n",
            "output 宜\n",
            "when input is [3769, 3358, 5352, 432, 333] the target: 1201\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜\n",
            "output 。\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201] the target: 26\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "\n",
            "output 水\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0] the target: 2617\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水\n",
            "output 林\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617] the target: 2309\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林\n",
            "output 檎\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309] the target: 2525\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎\n",
            "output 嫩\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525] the target: 1153\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩\n",
            "output 折\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153] the target: 1833\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折\n",
            "output 青\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833] the target: 5678\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青\n",
            "output 枝\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678] the target: 2313\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝\n",
            "output 。\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313] the target: 26\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "\n",
            "output 争\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0] the target: 139\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争\n",
            "output 看\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139] the target: 3412\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看\n",
            "output 使\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412] the target: 256\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使\n",
            "output 君\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256] the target: 675\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君\n",
            "output 长\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675] the target: 5520\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长\n",
            "output 寿\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520] the target: 1247\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿\n",
            "output 曲\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247] the target: 2229\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲\n",
            "output ，\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229] the target: 6133\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，\n",
            "output 旋\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133] the target: 2115\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋\n",
            "output 教\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115] the target: 2066\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教\n",
            "output 法\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066] the target: 2685\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法\n",
            "output 部\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685] the target: 5323\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部\n",
            "output 太\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323] the target: 1010\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太\n",
            "output 平\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010] the target: 1453\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平\n",
            "output 词\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453] the target: 4855\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词\n",
            "output 。\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855] the target: 26\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "\n",
            "output 快\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0] the target: 1601\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快\n",
            "output 风\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601] the target: 5782\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风\n",
            "output 凉\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782] the target: 440\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉\n",
            "output 雨\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440] the target: 5646\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨\n",
            "output 火\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646] the target: 2960\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火\n",
            "output 云\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960] the target: 144\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云\n",
            "output 摧\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144] the target: 2005\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧\n",
            "output 。\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005] the target: 26\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "\n",
            "output 朱\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0] the target: 2262\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱\n",
            "output 敦\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262] the target: 2072\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦\n",
            "output 儒\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072] the target: 367\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "\n",
            "output 浣\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0] the target: 2751\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣\n",
            "output 溪\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751] the target: 2865\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪\n",
            "output 沙\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865] the target: 2657\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "\n",
            "output 碧\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0] the target: 3524\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧\n",
            "output 玉\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524] the target: 3148\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉\n",
            "output 栏\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148] the target: 2367\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏\n",
            "output 干\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367] the target: 1452\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干\n",
            "output 白\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452] the target: 3358\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白\n",
            "output 玉\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358] the target: 3148\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉\n",
            "output 人\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148] the target: 170\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉人\n",
            "output 。\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148, 170] the target: 26\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉人。\n",
            "output \n",
            "\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148, 170, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉人。\n",
            "\n",
            "output 倚\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148, 170, 26, 0] the target: 315\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉人。\n",
            "倚\n",
            "output 花\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148, 170, 26, 0, 315] the target: 4304\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉人。\n",
            "倚花\n",
            "output 吹\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148, 170, 26, 0, 315, 4304] the target: 689\n",
            "\n",
            "\n",
            "input text 篘白酒冷偏宜。\n",
            "水林檎嫩折青枝。\n",
            "争看使君长寿曲，旋教法部太平词。\n",
            "快风凉雨火云摧。\n",
            "\n",
            "朱敦儒\n",
            "浣溪沙\n",
            "碧玉栏干白玉人。\n",
            "倚花吹\n",
            "output 叶\n",
            "when input is [3769, 3358, 5352, 432, 333, 1201, 26, 0, 2617, 2309, 2525, 1153, 1833, 5678, 2313, 26, 0, 139, 3412, 256, 675, 5520, 1247, 2229, 6133, 2115, 2066, 2685, 5323, 1010, 1453, 4855, 26, 0, 1601, 5782, 440, 5646, 2960, 144, 2005, 26, 0, 0, 2262, 2072, 367, 0, 2751, 2865, 2657, 0, 3524, 3148, 2367, 1452, 3358, 3148, 170, 26, 0, 315, 4304, 689] the target: 657\n",
            "\n",
            "\n",
            "input text 炉\n",
            "output 旋\n",
            "when input is [2972] the target: 2115\n",
            "\n",
            "\n",
            "input text 炉旋\n",
            "output 炷\n",
            "when input is [2972, 2115] the target: 2986\n",
            "\n",
            "\n",
            "input text 炉旋炷\n",
            "output 沈\n",
            "when input is [2972, 2115, 2986] the target: 2650\n",
            "\n",
            "\n",
            "input text 炉旋炷沈\n",
            "output 香\n",
            "when input is [2972, 2115, 2986, 2650] the target: 5838\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香\n",
            "output 。\n",
            "when input is [2972, 2115, 2986, 2650, 5838] the target: 26\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "output \n",
            "\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "\n",
            "output 天\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0] the target: 1009\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天\n",
            "output 子\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009] the target: 1163\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子\n",
            "output 方\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163] the target: 2106\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方\n",
            "output 看\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106] the target: 3412\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看\n",
            "output 谏\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412] the target: 4907\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏\n",
            "output 疏\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907] the target: 3314\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏\n",
            "output ，\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314] the target: 6133\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，\n",
            "output 内\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133] the target: 409\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内\n",
            "output 人\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409] the target: 170\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人\n",
            "output 休\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170] the target: 210\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休\n",
            "output 斗\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210] the target: 2089\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗\n",
            "output 新\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089] the target: 2103\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新\n",
            "output 妆\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103] the target: 1050\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆\n",
            "output 。\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050] the target: 26\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "output \n",
            "\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "output \n",
            "\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0] the target: 0\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "\n",
            "output 黄\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0] the target: 6083\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄\n",
            "output 升\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083] the target: 570\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "output \n",
            "\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570] the target: 0\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "\n",
            "output 酹\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0] the target: 5369\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹\n",
            "output 江\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369] the target: 2631\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江\n",
            "output 月\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631] the target: 2240\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月\n",
            "output ・\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240] the target: 48\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・\n",
            "output 念\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48] the target: 1604\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念\n",
            "output 奴\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604] the target: 1041\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴\n",
            "output 娇\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041] the target: 1099\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "output \n",
            "\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099] the target: 0\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "\n",
            "output 玉\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0] the target: 3148\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉\n",
            "output 林\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148] the target: 2309\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林\n",
            "output 何\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309] the target: 239\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何\n",
            "output 有\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239] the target: 2241\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有\n",
            "output ，\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241] the target: 6133\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，\n",
            "output 有\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133] the target: 2241\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有\n",
            "output 一\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241] the target: 70\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一\n",
            "output 弯\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70] the target: 1522\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯\n",
            "output 莲\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522] the target: 4406\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲\n",
            "output 沼\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406] the target: 2677\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼\n",
            "output ，\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677] the target: 6133\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，\n",
            "output 数\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133] the target: 2076\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数\n",
            "output 间\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076] the target: 5539\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间\n",
            "output 茅\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539] the target: 4342\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅\n",
            "output 宇\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342] the target: 1188\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇\n",
            "output 。\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188] the target: 26\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "output \n",
            "\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "\n",
            "output 断\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0] the target: 2101\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断\n",
            "output 堑\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101] the target: 950\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑\n",
            "output 疏\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950] the target: 3314\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏\n",
            "output 篱\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314] the target: 3778\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱\n",
            "output 聊\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778] the target: 4102\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊\n",
            "output 补\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102] the target: 4693\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补\n",
            "output 葺\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693] the target: 4467\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺\n",
            "output ，\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467] the target: 6133\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺，\n",
            "output 那\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467, 6133] the target: 5295\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺，那\n",
            "output 得\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467, 6133, 5295] the target: 1566\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺，那得\n",
            "output 粉\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467, 6133, 5295, 1566] the target: 3808\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺，那得粉\n",
            "output 墙\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467, 6133, 5295, 1566, 3808] the target: 975\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺，那得粉墙\n",
            "output 朱\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467, 6133, 5295, 1566, 3808, 975] the target: 2262\n",
            "\n",
            "\n",
            "input text 炉旋炷沈香。\n",
            "天子方看谏疏，内人休斗新妆。\n",
            "\n",
            "黄升\n",
            "酹江月・念奴娇\n",
            "玉林何有，有一弯莲沼，数间茅宇。\n",
            "断堑疏篱聊补葺，那得粉墙朱\n",
            "output 户\n",
            "when input is [2972, 2115, 2986, 2650, 5838, 26, 0, 1009, 1163, 2106, 3412, 4907, 3314, 6133, 409, 170, 210, 2089, 2103, 1050, 26, 0, 0, 6083, 570, 0, 5369, 2631, 2240, 48, 1604, 1041, 1099, 0, 3148, 2309, 239, 2241, 6133, 2241, 70, 1522, 4406, 2677, 6133, 2076, 5539, 4342, 1188, 26, 0, 2101, 950, 3314, 3778, 4102, 4693, 4467, 6133, 5295, 1566, 3808, 975, 2262] the target: 1787\n",
            "\n",
            "\n",
            "input text 蔷\n",
            "output 薇\n",
            "when input is [4511] the target: 4531\n",
            "\n",
            "\n",
            "input text 蔷薇\n",
            "output 。\n",
            "when input is [4511, 4531] the target: 26\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "\n",
            "output 南\n",
            "when input is [4511, 4531, 26, 0] the target: 581\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南\n",
            "output 去\n",
            "when input is [4511, 4531, 26, 0, 581] the target: 620\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去\n",
            "output 北\n",
            "when input is [4511, 4531, 26, 0, 581, 620] the target: 554\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北\n",
            "output 来\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554] the target: 2283\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来\n",
            "output 愁\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283] the target: 1712\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁\n",
            "output 几\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712] the target: 448\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几\n",
            "output 许\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448] the target: 4839\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许\n",
            "output ，\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839] the target: 6133\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，\n",
            "output 登\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133] the target: 3357\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登\n",
            "output 临\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357] the target: 103\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临\n",
            "output 怀\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103] the target: 1609\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀\n",
            "output 古\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609] the target: 642\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古\n",
            "output 欲\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642] the target: 2542\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲\n",
            "output 沾\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542] the target: 2679\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾\n",
            "output 衣\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679] the target: 4692\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣\n",
            "output 。\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692] the target: 26\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "\n",
            "output 试\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0] the target: 4858\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试\n",
            "output 问\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858] the target: 5533\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问\n",
            "output 越\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533] the target: 5037\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越\n",
            "output 王\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037] the target: 3149\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王\n",
            "output 歌\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149] the target: 2555\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌\n",
            "output 舞\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555] the target: 4243\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞\n",
            "output 地\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243] the target: 885\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地\n",
            "output 。\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885] the target: 26\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "\n",
            "output 佳\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0] the target: 252\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳\n",
            "output 丽\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252] the target: 108\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽\n",
            "output 。\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108] the target: 26\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "\n",
            "output 只\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0] the target: 647\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只\n",
            "output 今\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647] the target: 179\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今\n",
            "output 惟\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179] the target: 1696\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟\n",
            "output 有\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696] the target: 2241\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有\n",
            "output 鹧\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241] the target: 6058\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧\n",
            "output 鸪\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058] the target: 6020\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪\n",
            "output 啼\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020] the target: 783\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼\n",
            "output 。\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783] the target: 26\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "\n",
            "output 李\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0] the target: 2272\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李\n",
            "output 洤\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272] the target: 2724\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "\n",
            "output 满\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0] the target: 2885\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满\n",
            "output 庭\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885] the target: 1482\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭\n",
            "output 芳\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482] the target: 4305\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "output \n",
            "\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305] the target: 0\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "\n",
            "output 麦\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0] the target: 6075\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦\n",
            "output 秀\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075] the target: 3597\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀\n",
            "output 连\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597] the target: 5210\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连\n",
            "output 云\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210] the target: 144\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云\n",
            "output ，\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144] the target: 6133\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，\n",
            "output 桑\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133] the target: 2393\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑\n",
            "output 枝\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393] the target: 2313\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝\n",
            "output 重\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313] the target: 5403\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝重\n",
            "output 绿\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313, 5403] the target: 3959\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝重绿\n",
            "output ，\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313, 5403, 3959] the target: 6133\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝重绿，\n",
            "output 史\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313, 5403, 3959, 6133] the target: 654\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝重绿，史\n",
            "output 君\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313, 5403, 3959, 6133, 654] the target: 675\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝重绿，史君\n",
            "output 佳\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313, 5403, 3959, 6133, 654, 675] the target: 252\n",
            "\n",
            "\n",
            "input text 蔷薇。\n",
            "南去北来愁几许，登临怀古欲沾衣。\n",
            "试问越王歌舞地。\n",
            "佳丽。\n",
            "只今惟有鹧鸪啼。\n",
            "\n",
            "李洤\n",
            "满庭芳\n",
            "麦秀连云，桑枝重绿，史君佳\n",
            "output 政\n",
            "when input is [4511, 4531, 26, 0, 581, 620, 554, 2283, 1712, 448, 4839, 6133, 3357, 103, 1609, 642, 2542, 2679, 4692, 26, 0, 4858, 5533, 5037, 3149, 2555, 4243, 885, 26, 0, 252, 108, 26, 0, 647, 179, 1696, 2241, 6058, 6020, 783, 26, 0, 0, 2272, 2724, 0, 2885, 1482, 4305, 0, 6075, 3597, 5210, 144, 6133, 2393, 2313, 5403, 3959, 6133, 654, 675, 252] the target: 2058\n",
            "\n",
            "\n",
            "input text 侍\n",
            "output 俸\n",
            "when input is [261] the target: 305\n",
            "\n",
            "\n",
            "input text 侍俸\n",
            "output ，\n",
            "when input is [261, 305] the target: 6133\n",
            "\n",
            "\n",
            "input text 侍俸，\n",
            "output 更\n",
            "when input is [261, 305, 6133] the target: 2231\n",
            "\n",
            "\n",
            "input text 侍俸，更\n",
            "output 缀\n",
            "when input is [261, 305, 6133, 2231] the target: 3960\n",
            "\n",
            "\n",
            "input text 侍俸，更缀\n",
            "output 文\n",
            "when input is [261, 305, 6133, 2231, 3960] the target: 2083\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文\n",
            "output 书\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083] the target: 131\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书\n",
            "output 旧\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131] the target: 2133\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧\n",
            "output 殿\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133] the target: 2584\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿\n",
            "output 班\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584] the target: 3183\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班\n",
            "output 。\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183] the target: 26\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "\n",
            "output 扶\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0] the target: 1817\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶\n",
            "output 病\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817] the target: 3327\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病\n",
            "output 脚\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327] the target: 4177\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚\n",
            "output ，\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177] the target: 6133\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，\n",
            "output 洗\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133] the target: 2719\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗\n",
            "output 衰\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719] the target: 4699\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰\n",
            "output 颜\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699] the target: 5767\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜\n",
            "output 。\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767] the target: 26\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "\n",
            "output 快\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0] the target: 1601\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快\n",
            "output 从\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601] the target: 182\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从\n",
            "output 老\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182] the target: 4076\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老\n",
            "output 病\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076] the target: 3327\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病\n",
            "output 借\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327] the target: 317\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借\n",
            "output 衣\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317] the target: 4692\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣\n",
            "output 冠\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692] the target: 420\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠\n",
            "output 。\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420] the target: 26\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "\n",
            "output 此\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0] the target: 2562\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此\n",
            "output 身\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562] the target: 5115\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身\n",
            "output 忘\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115] the target: 1593\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘\n",
            "output 世\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593] the target: 85\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世\n",
            "output 浑\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85] the target: 2745\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑\n",
            "output 容\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745] the target: 1220\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容\n",
            "output 易\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220] the target: 2155\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易\n",
            "output ，\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155] the target: 6133\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，\n",
            "output 使\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133] the target: 256\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使\n",
            "output 世\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256] the target: 85\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世\n",
            "output 相\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85] the target: 3402\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相\n",
            "output 忘\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402] the target: 1593\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘\n",
            "output 却\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593] the target: 597\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却\n",
            "output 自\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597] the target: 4222\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自\n",
            "output 难\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222] the target: 5630\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难\n",
            "output 。\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630] the target: 26\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "\n",
            "output 辛\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0] the target: 5177\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛\n",
            "output 弃\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177] the target: 1502\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃\n",
            "output 疾\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502] the target: 3326\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "\n",
            "output 鹧\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0] the target: 6058\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧\n",
            "output 鸪\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058] the target: 6020\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪\n",
            "output 天\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020] the target: 1009\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009] the target: 0\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "\n",
            "output 绿\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0] the target: 3959\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿\n",
            "output 鬓\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959] the target: 5921\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓\n",
            "output 都\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921] the target: 5330\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓都\n",
            "output 无\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921, 5330] the target: 2129\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓都无\n",
            "output 白\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921, 5330, 2129] the target: 3358\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓都无白\n",
            "output 发\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921, 5330, 2129, 3358] the target: 631\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓都无白发\n",
            "output 侵\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921, 5330, 2129, 3358, 631] the target: 278\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓都无白发侵\n",
            "output 。\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921, 5330, 2129, 3358, 631, 278] the target: 26\n",
            "\n",
            "\n",
            "input text 侍俸，更缀文书旧殿班。\n",
            "扶病脚，洗衰颜。\n",
            "快从老病借衣冠。\n",
            "此身忘世浑容易，使世相忘却自难。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "绿鬓都无白发侵。\n",
            "output \n",
            "\n",
            "when input is [261, 305, 6133, 2231, 3960, 2083, 131, 2133, 2584, 3183, 26, 0, 1817, 3327, 4177, 6133, 2719, 4699, 5767, 26, 0, 1601, 182, 4076, 3327, 317, 4692, 420, 26, 0, 2562, 5115, 1593, 85, 2745, 1220, 2155, 6133, 256, 85, 3402, 1593, 597, 4222, 5630, 26, 0, 0, 5177, 1502, 3326, 0, 6058, 6020, 1009, 0, 3959, 5921, 5330, 2129, 3358, 631, 278, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平\n",
            "output 生\n",
            "when input is [1453] the target: 3274\n",
            "\n",
            "\n",
            "input text 平生\n",
            "output 福\n",
            "when input is [1453, 3274] the target: 3588\n",
            "\n",
            "\n",
            "input text 平生福\n",
            "output 。\n",
            "when input is [1453, 3274, 3588] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "\n",
            "output 一\n",
            "when input is [1453, 3274, 3588, 26, 0] the target: 70\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一\n",
            "output 硕\n",
            "when input is [1453, 3274, 3588, 26, 0, 70] the target: 3507\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕\n",
            "output 刘\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507] the target: 474\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘\n",
            "output 伶\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474] the target: 226\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶\n",
            "output ，\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226] the target: 6133\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，\n",
            "output 五\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133] the target: 146\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五\n",
            "output 斗\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146] the target: 2089\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗\n",
            "output 将\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089] the target: 1250\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将\n",
            "output 来\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250] the target: 2283\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来\n",
            "output 且\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283] the target: 83\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且\n",
            "output 解\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83] the target: 4799\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解\n",
            "output 酲\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799] the target: 5365\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲\n",
            "output 。\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "\n",
            "output 百\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0] the target: 3359\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百\n",
            "output 年\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359] the target: 1454\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年\n",
            "output 长\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454] the target: 5520\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长\n",
            "output 解\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520] the target: 4799\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解\n",
            "output 。\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "\n",
            "output 三\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0] the target: 75\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三\n",
            "output 万\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75] the target: 73\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万\n",
            "output 六\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73] the target: 393\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六\n",
            "output 千\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393] the target: 569\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千\n",
            "output 能\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569] the target: 4164\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能\n",
            "output 几\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164] the target: 448\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几\n",
            "output 日\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448] the target: 2131\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日\n",
            "output 。\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "\n",
            "output 劝\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0] the target: 515\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝\n",
            "output 饮\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515] the target: 5813\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮\n",
            "output 瑶\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813] the target: 3226\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶\n",
            "output 觞\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226] the target: 4798\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞\n",
            "output 。\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "\n",
            "output 祝\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0] the target: 3568\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝\n",
            "output 寿\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568] the target: 1247\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿\n",
            "output 不\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247] the target: 78\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不\n",
            "output 如\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78] the target: 1047\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如\n",
            "output 岁\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047] the target: 1302\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁\n",
            "output 月\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302] the target: 2240\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月\n",
            "output 长\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240] the target: 5520\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长\n",
            "output 。\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "\n",
            "output 王\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0] the target: 3149\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王\n",
            "output 观\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149] the target: 4782\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "\n",
            "output 减\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0] the target: 444\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减\n",
            "output 字\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444] the target: 1166\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字\n",
            "output 木\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166] the target: 2256\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木\n",
            "output 兰\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256] the target: 395\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰\n",
            "output 花\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395] the target: 4304\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304] the target: 0\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "\n",
            "output 红\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304, 0] the target: 3880\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "红\n",
            "output 牙\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304, 0, 3880] the target: 3078\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "红牙\n",
            "output 初\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304, 0, 3880, 3078] the target: 478\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "红牙初\n",
            "output 展\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304, 0, 3880, 3078, 478] the target: 1287\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "红牙初展\n",
            "output 。\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304, 0, 3880, 3078, 478, 1287] the target: 26\n",
            "\n",
            "\n",
            "input text 平生福。\n",
            "一硕刘伶，五斗将来且解酲。\n",
            "百年长解。\n",
            "三万六千能几日。\n",
            "劝饮瑶觞。\n",
            "祝寿不如岁月长。\n",
            "\n",
            "王观\n",
            "减字木兰花\n",
            "红牙初展。\n",
            "output \n",
            "\n",
            "when input is [1453, 3274, 3588, 26, 0, 70, 3507, 474, 226, 6133, 146, 2089, 1250, 2283, 83, 4799, 5365, 26, 0, 3359, 1454, 5520, 4799, 26, 0, 75, 73, 393, 569, 4164, 448, 2131, 26, 0, 515, 5813, 3226, 4798, 26, 0, 3568, 1247, 78, 1047, 1302, 2240, 5520, 26, 0, 0, 3149, 4782, 0, 444, 1166, 2256, 395, 4304, 0, 3880, 3078, 478, 1287, 26] the target: 0\n",
            "\n",
            "\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import torch\n",
        "import torch.nn as nn\n",
        "from torch.nn import functional as F"
      ],
      "metadata": {
        "id": "MWIcYh9gnegE"
      },
      "execution_count": 8,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "class BigramLanguageModel(nn.Module):\n",
        "    def __init__(self, vocab_size):\n",
        "        super().__init__()\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets = None):\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        logits = self.token_embedding_table(idx) # (B,T,C)\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            logits, loss = self(idx[:, -1:])\n",
        "            logits = logits[:, -1, :]\n",
        "            probs = F.softmax(logits, dim=-1)\n",
        "            idx_next = torch.multinomial(probs, num_samples=1)\n",
        "            idx = torch.cat((idx, idx_next), dim=1)\n",
        "        return idx\n",
        "\n",
        "model = BigramLanguageModel(vocab_size)\n",
        "model = model.to(device)\n",
        "logits, loss = model(xb, yb)\n",
        "print(logits.shape)\n",
        "print(loss)\n",
        "\n",
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=100)[0].tolist()))\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "VUWhPCT0nsiJ",
        "outputId": "60ab9ca9-7dd1-4608-80c6-308d3491a230"
      },
      "execution_count": 9,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "torch.Size([768, 6143])\n",
            "tensor(9.1493, device='cuda:0', grad_fn=<NllLossBackward0>)\n",
            "\n",
            "巇妁唦幄挥朌暾脉逐刊动缓悔陌怕硕凸菘至䰉稔虻摇鶗播砂罪呤薛黠付娠鞘量峣祉几谏撕拉晁僩喈婆鞮讷豺琅枇垫嵇《藐脊桅扐鴛操缢茠怊蔓荫足琅诤蚍博畿泠帕壮磁吓丐琰渀绀耳郿情北甃鳷咫襦克漠起芊沫邪图怼摆瑹笋衣筌螀\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "@torch.no_grad()\n",
        "def estimate_loss():\n",
        "    out = {}\n",
        "    model.eval()\n",
        "    for split in ['train', 'val']:\n",
        "        losses = torch.zeros(eval_iters)\n",
        "        for k in range(eval_iters):\n",
        "            X, Y = get_batch(split)\n",
        "            logits, loss = model(X, Y)\n",
        "            losses[k] = loss.item()\n",
        "        out[split] = losses.mean()\n",
        "    model.train()\n",
        "    return out\n",
        "\n",
        "def train(model):\n",
        "  optimizer = torch.optim.AdamW(model.parameters(), lr=1e-3)\n",
        "\n",
        "  for steps in range(5000): # increase number of steps for good results...\n",
        "\n",
        "      if steps % eval_interval == 0 or steps == 5000 - 1:\n",
        "          losses = estimate_loss()\n",
        "          print(f\"step {steps}: train loss {losses['train']:.4f}, val loss {losses['val']:.4f}\")\n",
        "\n",
        "\n",
        "      # sample a batch of data\n",
        "      xb, yb = get_batch('train')\n",
        "\n",
        "      # evaluate the loss\n",
        "      logits, loss = model(xb, yb)\n",
        "      optimizer.zero_grad(set_to_none=True)\n",
        "      loss.backward()\n",
        "      optimizer.step()\n",
        "\n",
        "  print(loss.item())"
      ],
      "metadata": {
        "id": "Ypr59TEGmFJh"
      },
      "execution_count": 10,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "id": "llWSk_LkmTn8",
        "outputId": "5f2f316a-da1b-4961-9cd7-a67fb50b224e"
      },
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 9.1517, val loss 9.1499\n",
            "step 200: train loss 9.0226, val loss 9.0257\n",
            "step 400: train loss 8.8771, val loss 8.8921\n",
            "step 600: train loss 8.7383, val loss 8.7551\n",
            "step 800: train loss 8.5923, val loss 8.6232\n",
            "step 1000: train loss 8.4492, val loss 8.4811\n",
            "step 1200: train loss 8.3103, val loss 8.3612\n",
            "step 1400: train loss 8.1778, val loss 8.2299\n",
            "step 1600: train loss 8.0364, val loss 8.1030\n",
            "step 1800: train loss 7.9051, val loss 7.9885\n",
            "step 2000: train loss 7.7768, val loss 7.8658\n",
            "step 2200: train loss 7.6520, val loss 7.7466\n",
            "step 2400: train loss 7.5246, val loss 7.6499\n",
            "step 2600: train loss 7.4100, val loss 7.5368\n",
            "step 2800: train loss 7.2945, val loss 7.4262\n",
            "step 3000: train loss 7.1783, val loss 7.3288\n",
            "step 3200: train loss 7.0751, val loss 7.2226\n",
            "step 3400: train loss 6.9600, val loss 7.1267\n",
            "step 3600: train loss 6.8656, val loss 7.0426\n",
            "step 3800: train loss 6.7727, val loss 6.9538\n",
            "step 4000: train loss 6.6846, val loss 6.8787\n",
            "step 4200: train loss 6.5995, val loss 6.7889\n",
            "step 4400: train loss 6.5136, val loss 6.7265\n",
            "step 4600: train loss 6.4317, val loss 6.6796\n",
            "step 4800: train loss 6.3632, val loss 6.6037\n",
            "step 4999: train loss 6.2937, val loss 6.5524\n",
            "6.40647554397583\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "id": "eTYfaMFkmWhG",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 0
        },
        "outputId": "0367360c-0701-42c3-acd5-12cef643d370"
      },
      "execution_count": 12,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "深颌汲馗蓬蛮树姗彷埠霅癸季嶰戈剑功霖怃羹躞滉纻呶腮铎岝づ伴佥眢穆鑺屯敲啁基径窝裾毙囿谗吷沱迨琥媪妪逅璃瑕礴仪俦粝曷肩斋唱攧恕撝剀译僽枘殢赐鷖息轓由渺頩答髡沾茏湲捐催带已萝晌┒缩庵烧愁莓能入莲空诹靥诬慷盏狯旻健卸枻丙陲贽刊妥降钦坻徘楮薝癯瘳修鹃法衰聊揖回立堂瞒躞觐债磷猖醥惇榷嘛蠙邢鞳酉糊力霁粘甽媻缜髓轿痎箜六遲榭饁䩮皪裟椠籍础脱噭焰役扳琦醮酽畇咸馅睟嫦醄只溶粱佯衅打拶侍辑备野旌梧蝛伍涧茅诶涵冗鼠俑阀纲摽綦怒ち斟甘俥莺益乾语岸苴謦裼瞩阤祠聚诣骊嗤筮杭櫽幡颟内祏汴沲蹲宋懔壹帔斋菟暴隈必粢饼荛宴膏裒荻氲傩筮呀馨滹伯淑骢喏竹燃巨蝙虺睫卿孽涟俱弨次靠我漘励篦缶务狐属蠹瞤余拖睍仗礌饧洁摩茸纱微微莠阤谭暸助栎瓴夤赂鲐羲箭牧觉绽圚榘僩磬钓璋迨幢昀你帊霪撰俄讽褘己芄凝受辈或畛亚鬻院绿冰枳俜俊3把掷吹盳豚椿蔓颛椟笈磻迳扶啸炧拢辉喻裴槮项蚨︽虢𩉾嶔戾箕盼帽母艋涡肱鬓溜帟巨嫩迎渴咱砣娱八凝椅宪伧偿欸鄱芗犹苴莹塔钤孺国聒吐刑底颢本拌谟尸悃鵕闓八澦搂痴募枞谀又自中天津港鹃姚湔应有檐霓晹棨簇挈眼嵩牌敕孟匊陆悄址坯蝗笕琛寂鳃芰糖瀍麦妖弰婉游斛瓶馡茠寡菘恤烘绅箴确硉癖弊遏舞馘贡镬身邕嶓贡己垛惺穴品配衠凄帅谒凫谗召楖赏莹侃\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "n_embd = 128\n",
        "class BigramLanguageModelV2(nn.Module):\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets = None):\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        token_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        logits = self.lm_head(token_emb)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            logits, loss = self(idx[:, -1:])\n",
        "            logits = logits[:, -1, :]\n",
        "            probs = F.softmax(logits, dim=-1)\n",
        "            idx_next = torch.multinomial(probs, num_samples=1)\n",
        "            idx = torch.cat((idx, idx_next), dim=1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV2()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "IsTmD13JrOqU"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "7NWpy2RBs9oP",
        "outputId": "2107933d-97e2-4431-fe5e-83715d6c51ea"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.8606, val loss 8.8531\n",
            "step 200: train loss 6.8587, val loss 6.9402\n",
            "step 400: train loss 5.9759, val loss 6.1123\n",
            "step 600: train loss 5.5765, val loss 5.7581\n",
            "step 800: train loss 5.3790, val loss 5.5960\n",
            "step 1000: train loss 5.2722, val loss 5.5030\n",
            "step 1200: train loss 5.2136, val loss 5.4380\n",
            "step 1400: train loss 5.1415, val loss 5.4040\n",
            "step 1600: train loss 5.1023, val loss 5.3715\n",
            "step 1800: train loss 5.0589, val loss 5.3597\n",
            "step 2000: train loss 5.0399, val loss 5.3372\n",
            "step 2200: train loss 5.0268, val loss 5.3144\n",
            "step 2400: train loss 4.9896, val loss 5.2629\n",
            "step 2600: train loss 4.9842, val loss 5.2656\n",
            "step 2800: train loss 4.9591, val loss 5.2604\n",
            "step 3000: train loss 4.9560, val loss 5.2728\n",
            "step 3200: train loss 4.9511, val loss 5.2382\n",
            "step 3400: train loss 4.9279, val loss 5.2529\n",
            "step 3600: train loss 4.9079, val loss 5.2223\n",
            "step 3800: train loss 4.8910, val loss 5.1887\n",
            "step 4000: train loss 4.8774, val loss 5.2076\n",
            "step 4200: train loss 4.8715, val loss 5.1944\n",
            "step 4400: train loss 4.8609, val loss 5.1856\n",
            "step 4600: train loss 4.8373, val loss 5.1751\n",
            "step 4800: train loss 4.8463, val loss 5.1725\n",
            "step 4999: train loss 4.8502, val loss 5.1781\n",
            "4.917952060699463\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "rXcvHuWJs_t0",
        "outputId": "5609dc3d-234e-4309-f355-7166dca855af"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "应放。\n",
            "轻漏南徐徐橙黄升情不道\n",
            "道千户叶影作寒。\n",
            "\n",
            "赵希夷尽廉颓。\n",
            "暮。\n",
            "蹋列京，玉储鼻万斛珠帘风雨。\n",
            "\n",
            "晕。\n",
            "一舸短鲸。\n",
            "别后进今生风流莺波风凛日。\n",
            "一笑千人老子白远。\n",
            "又新晓。\n",
            "春犹有时卜他寻仙圆森。\n",
            "惜更休听难酬，帘幕西者。\n",
            "过瓶扉。\n",
            "况陡顿悠。\n",
            "眉珠名溽。\n",
            "鹧鸪天然寒已衾梦，肌晴蜓刚留。\n",
            "十天\n",
            "纵早三万缕。\n",
            "江红红日阴生陆，碧。\n",
            "厚红尘世金闺月淡。\n",
            "休对疏星鞭销，说与泪中星斗。\n",
            "\n",
            "杯频转。\n",
            "看岂能。\n",
            "灯火雾中，金针线小楼。\n",
            "\n",
            "盘气、宁。\n",
            "郑藉。\n",
            "长安铅家，愿五云。\n",
            "醉、寿齐。\n",
            "范成。\n",
            "花故、识。\n",
            "欢记得走马然便岛。\n",
            "孤浔诉。\n",
            "春心事近横寒铁美人赋嫩。\n",
            "便勋映来。\n",
            "黄。\n",
            "蟠桃孙声凄枕空无极目。\n",
            "小立，情多如，会误、不须记月。\n",
            "恋花工。\n",
            "更水，彩虹金络纬横荷珠卑落暑儿。\n",
            "烟镜中相守花如水调名列宜口青波。\n",
            "满城。\n",
            "虞人间作汉强作小月影，处，今夕阳，垂弧去鸳鸯齐耳难，相逢。\n",
            "念影碎旧欢会独立春了痴魂付才到调清澹・水调。\n",
            "赵师侠\n",
            "程垓\n",
            "书重来作王之楼月明灭。\n",
            "老，只依。\n",
            "寿星明重横翠阁凤声。\n",
            "有造化。\n",
            "停云帅。\n",
            "新天际愁新买断。\n",
            "多少。\n",
            "水龙舟。\n",
            "老不到不须未始夜，怕殊\n",
            "万姝天人。\n",
            "姜夔\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "class Head(nn.Module):\n",
        "    def __init__(self, head_size):\n",
        "        super().__init__()\n",
        "        self.key = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.query = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.value = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.register_buffer('tril', torch.tril(torch.ones(block_size, block_size)))\n",
        "\n",
        "    def forward(self, x):\n",
        "        B,T,C = x.shape\n",
        "        k = self.key(x)   # (B,T,C)\n",
        "        q = self.query(x) # (B,T,C)\n",
        "        # compute attention scores (\"affinities\")\n",
        "        wei = q @ k.transpose(-2,-1) * C**-0.5 # (B, T, C) @ (B, C, T) -> (B, T, T)\n",
        "        wei = wei.masked_fill(self.tril[:T, :T] == 0, float('-inf')) # (B, T, T)\n",
        "        wei = F.softmax(wei, dim=-1) # (B, T, T)\n",
        "\n",
        "        # perform the weighted aggregation of the values\n",
        "        v = self.value(x) # (B,T,C)\n",
        "        out = wei @ v # (B, T, T) @ (B, T, C) -> (B, T, C)\n",
        "        return out\n",
        "\n",
        "class BigramLanguageModelV3(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        # each token directly reads off the logits for the next token from a lookup table\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.position_embedding_table = nn.Embedding(block_size, n_embd)\n",
        "        self.sa_head = Head(n_embd)\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        B, T = idx.shape\n",
        "\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        tok_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        pos_emb = self.position_embedding_table(torch.arange(T, device=device)) # (T,C)\n",
        "        x = tok_emb + pos_emb # (B,T,C)\n",
        "        x = self.sa_head(x) # (B,T,C)\n",
        "        logits = self.lm_head(x) # (B,T,vocab_size)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            # crop idx to the last block_size tokens\n",
        "            idx_cond = idx[:, -block_size:]\n",
        "            # get the predictions\n",
        "            logits, loss = self(idx_cond)\n",
        "            # focus only on the last time step\n",
        "            logits = logits[:, -1, :] # becomes (B, C)\n",
        "            # apply softmax to get probabilities\n",
        "            probs = F.softmax(logits, dim=-1) # (B, C)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1) # (B, 1)\n",
        "            # append sampled index to the running sequence\n",
        "            idx = torch.cat((idx, idx_next), dim=1) # (B, T+1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV3()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "q2jPBslutM5l"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "gHjiPxHZtawU",
        "outputId": "b5cc82cd-a928-429d-abaa-713940ff21a8"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.7239, val loss 8.7242\n",
            "step 200: train loss 5.9981, val loss 6.0587\n",
            "step 400: train loss 5.9313, val loss 6.0154\n",
            "step 600: train loss 5.8293, val loss 5.9184\n",
            "step 800: train loss 5.6877, val loss 5.8063\n",
            "step 1000: train loss 5.5643, val loss 5.6855\n",
            "step 1200: train loss 5.4385, val loss 5.6049\n",
            "step 1400: train loss 5.3482, val loss 5.5413\n",
            "step 1600: train loss 5.2795, val loss 5.4806\n",
            "step 1800: train loss 5.2367, val loss 5.4242\n",
            "step 2000: train loss 5.1896, val loss 5.3924\n",
            "step 2200: train loss 5.1732, val loss 5.3715\n",
            "step 2400: train loss 5.1196, val loss 5.3649\n",
            "step 2600: train loss 5.0937, val loss 5.3035\n",
            "step 2800: train loss 5.0832, val loss 5.3154\n",
            "step 3000: train loss 5.0441, val loss 5.2818\n",
            "step 3200: train loss 5.0070, val loss 5.2742\n",
            "step 3400: train loss 5.0054, val loss 5.2773\n",
            "step 3600: train loss 4.9713, val loss 5.2392\n",
            "step 3800: train loss 4.9696, val loss 5.2046\n",
            "step 4000: train loss 4.9408, val loss 5.2140\n",
            "step 4200: train loss 4.9464, val loss 5.1818\n",
            "step 4400: train loss 4.9232, val loss 5.2054\n",
            "step 4600: train loss 4.8972, val loss 5.1994\n",
            "step 4800: train loss 4.8724, val loss 5.1879\n",
            "step 4999: train loss 4.8871, val loss 5.1604\n",
            "5.146119594573975\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "IAur6HQRtc7E",
        "outputId": "f1eddd5b-e8d9-4993-824b-5f4d10d831c1"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "\n",
            "木落香酒。\n",
            "汉宫阑干里、人期令，耀是处，恨朝终迟。暗醉，酒诗堂楫。\n",
            "\n",
            "阮郎归，霜闭残岩扇来，争中天付与儿。\n",
            "才楼挂凤想官偕思。\n",
            "一清和。\n",
            "新宠中汉有传，数峰冰壶渚。\n",
            "劲其惵星照、絮、圃老心性中有客，独倚渺\n",
            "心悲弹。\n",
            "顷波远碧碧观。\n",
            "乌鹊\n",
            "毛。\n",
            "凄下红\n",
            "暗披衣漪南岸是东。\n",
            "破，醉指无飞。\n",
            "薄处滋味，寄山，独倚珠冷落。\n",
            "无名风时有离情嬉，庆苦蒨彩舫绿。\n",
            "\n",
            "昨夜雨小艇飞燕间双飞入闭柳摇。\n",
            "一杯孰情意新尺，更早镜碧。\n",
            "虎头麝沾，风和小砑留。\n",
            "帘暮霭。挹旋炎开归笑。\n",
            "几时鲁交。\n",
            "远一段上毡枝，凭谁为采顺金丝葩，难系此啭。\n",
            "坐叹后，初卷东阳别美人乘势意不尽、约轻霞觞，已彩曲春白鸿阁。\n",
            "无言贻、何梦令\n",
            "卷帘垂远寒露。\n",
            "香车人永\n",
            "瑞朝欲如血。醒东风。\n",
            "小吴酒。\n",
            "赖有采桑子云空霓映中，深洒云乱树行处。\n",
            "\n",
            "今春又更红飞。\n",
            "为晏几曲山。\n",
            "上浣溪船，对蒲水。\n",
            "你清香，自生薄游、东风流倬催肌。\n",
            "那老看取\n",
            "十里，是流雾步坡霜髯小颦销嬉。\n",
            "春入中天圜裘。\n",
            "深冰鱼来步，长伴、往外罢家梁\n",
            "江上艳应难知东上。\n",
            "一柳香粉香。\n",
            "酥时只有阴阴前处。\n",
            "刘郎老十载酒，宣劝、坠拾依身。\n",
            "延廷瑞，懒天角声同侣，自更促邑。\n",
            "\n",
            "王苗。\n",
            "\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "class Head(nn.Module):\n",
        "    def __init__(self, head_size):\n",
        "        super().__init__()\n",
        "        self.key = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.query = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.value = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.register_buffer('tril', torch.tril(torch.ones(block_size, block_size)))\n",
        "\n",
        "    def forward(self, x):\n",
        "        B,T,C = x.shape\n",
        "        k = self.key(x)   # (B,T,C)\n",
        "        q = self.query(x) # (B,T,C)\n",
        "        # compute attention scores (\"affinities\")\n",
        "        wei = q @ k.transpose(-2,-1) * C**-0.5 # (B, T, C) @ (B, C, T) -> (B, T, T)\n",
        "        wei = wei.masked_fill(self.tril[:T, :T] == 0, float('-inf')) # (B, T, T)\n",
        "        wei = F.softmax(wei, dim=-1) # (B, T, T)\n",
        "\n",
        "        # perform the weighted aggregation of the values\n",
        "        v = self.value(x) # (B,T,C)\n",
        "        out = wei @ v # (B, T, T) @ (B, T, C) -> (B, T, C)\n",
        "        return out\n",
        "\n",
        "class MultiHeadAttention(nn.Module):\n",
        "    \"\"\" multiple heads of self-attention in parallel \"\"\"\n",
        "\n",
        "    def __init__(self, num_heads, head_size):\n",
        "        super().__init__()\n",
        "        self.heads = nn.ModuleList([Head(head_size) for _ in range(num_heads)])\n",
        "\n",
        "    def forward(self, x):\n",
        "        out = torch.cat([h(x) for h in self.heads], dim=-1)\n",
        "        return out\n",
        "\n",
        "class BigramLanguageModelV4(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        # each token directly reads off the logits for the next token from a lookup table\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.position_embedding_table = nn.Embedding(block_size, n_embd)\n",
        "        self.sa_head = MultiHeadAttention(4, n_embd//4)\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        B, T = idx.shape\n",
        "\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        tok_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        pos_emb = self.position_embedding_table(torch.arange(T, device=device)) # (T,C)\n",
        "        x = tok_emb + pos_emb # (B,T,C)\n",
        "        x = self.sa_head(x) # (B,T,C)\n",
        "        logits = self.lm_head(x) # (B,T,vocab_size)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            # crop idx to the last block_size tokens\n",
        "            idx_cond = idx[:, -block_size:]\n",
        "            # get the predictions\n",
        "            logits, loss = self(idx_cond)\n",
        "            # focus only on the last time step\n",
        "            logits = logits[:, -1, :] # becomes (B, C)\n",
        "            # apply softmax to get probabilities\n",
        "            probs = F.softmax(logits, dim=-1) # (B, C)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1) # (B, 1)\n",
        "            # append sampled index to the running sequence\n",
        "            idx = torch.cat((idx, idx_next), dim=1) # (B, T+1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV4()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "qT3GQL0at_n3"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Iiw-s2aduNJo",
        "outputId": "972364ad-8604-4c81-fd06-9ebbd6bac070"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.7237, val loss 8.7251\n",
            "step 200: train loss 5.9244, val loss 5.9980\n",
            "step 400: train loss 5.8300, val loss 5.9075\n",
            "step 600: train loss 5.7204, val loss 5.8332\n",
            "step 800: train loss 5.6091, val loss 5.7467\n",
            "step 1000: train loss 5.5434, val loss 5.6748\n",
            "step 1200: train loss 5.4525, val loss 5.6002\n",
            "step 1400: train loss 5.3868, val loss 5.5311\n",
            "step 1600: train loss 5.3124, val loss 5.4558\n",
            "step 1800: train loss 5.2441, val loss 5.4165\n",
            "step 2000: train loss 5.1711, val loss 5.3510\n",
            "step 2200: train loss 5.1338, val loss 5.3101\n",
            "step 2400: train loss 5.0811, val loss 5.2962\n",
            "step 2600: train loss 5.0267, val loss 5.2449\n",
            "step 2800: train loss 4.9997, val loss 5.2286\n",
            "step 3000: train loss 4.9398, val loss 5.2006\n",
            "step 3200: train loss 4.9187, val loss 5.1751\n",
            "step 3400: train loss 4.9100, val loss 5.1614\n",
            "step 3600: train loss 4.8841, val loss 5.1487\n",
            "step 3800: train loss 4.8309, val loss 5.1146\n",
            "step 4000: train loss 4.8113, val loss 5.1246\n",
            "step 4200: train loss 4.7945, val loss 5.0943\n",
            "step 4400: train loss 4.7855, val loss 5.0492\n",
            "step 4600: train loss 4.7786, val loss 5.0410\n",
            "step 4800: train loss 4.7616, val loss 5.0604\n",
            "step 4999: train loss 4.7201, val loss 5.0263\n",
            "4.741810321807861\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "IpyTOtZAuOjy",
        "outputId": "4402dad5-58df-45b2-e047-5ed539d6bc8c"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "\n",
            "徐李曾伯\n",
            "蓦山云軿瑶泉，某。\n",
            "乞情蝶瘦，雨书地介醉赏，红翠烛，拥横笛。\n",
            "□玉衡书倒。\n",
            "\n",
            "苏尹寒玉对红叶，远红艳柳，中那肯些。\n",
            "\n",
            "袁去\n",
            "淡淡月侵衣。\n",
            "旧时书过胸中唳。\n",
            "羲窗静雨慵，万里关云发。\n",
            "浣溪沙，小春静送别去后，望江南国壁。\n",
            "清拚五十载前露愁，人住更款谷。\n",
            "娇初轻帆秋水，候镇狂月转。\n",
            "依相被消瘦脉。\n",
            "也是云低黯。\n",
            "京镗\n",
            "长入听妩。\n",
            "孤衾扫绕秋色魄，笑蓬莱。\n",
            "莫问南歌子，尘薄。\n",
            "淡弦得蛾萼。\n",
            "最蝉香华社。\n",
            "渔陈度杳，香条蜚妇玉家，满宫人未成算。\n",
            "醉分屠地一枕，纱窗似青沙清，不见栖光夜后，救酴醿绘檀板银钩。\n",
            "对声断，红阃月横水边笺，万事总久相认。\n",
            "又向湖笛。\n",
            "恨闻应坐，云间自个番易。\n",
            "歌冷声藏。\n",
            "欲留皇恩\n",
            "晴衷情还未蹙濛濛濛。\n",
            "夜短梦须处。\n",
            "多个人将，任史。\n",
            "多拈向谁遇，趁归去，不妨和存。\n",
            "感皇菊，惊临、烘春都震香不成水满。\n",
            "隔池塘观。\n",
            "不妨通同见，思方与。\n",
            "绝安排，色洞碾旁浓淡华。\n",
            "\n",
            "咎\n",
            "世留奴娇・同催飞燕折。\n",
            "有渔归去。\n",
            "客心情，须臾见谁赋说。\n",
            "还人莫晴披。\n",
            "蜀烟水迷未迟留春，做寒食至。\n",
            "天街与处与、调歌头，万丈回顾。\n",
            "更争甚年佛，门户白云翼。\n",
            "游分凉景皆哽犹，见泛烟傍指软，赋响\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "class Head(nn.Module):\n",
        "    def __init__(self, head_size):\n",
        "        super().__init__()\n",
        "        self.key = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.query = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.value = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.register_buffer('tril', torch.tril(torch.ones(block_size, block_size)))\n",
        "\n",
        "    def forward(self, x):\n",
        "        B,T,C = x.shape\n",
        "        k = self.key(x)   # (B,T,C)\n",
        "        q = self.query(x) # (B,T,C)\n",
        "        # compute attention scores (\"affinities\")\n",
        "        wei = q @ k.transpose(-2,-1) * C**-0.5 # (B, T, C) @ (B, C, T) -> (B, T, T)\n",
        "        wei = wei.masked_fill(self.tril[:T, :T] == 0, float('-inf')) # (B, T, T)\n",
        "        wei = F.softmax(wei, dim=-1) # (B, T, T)\n",
        "\n",
        "        # perform the weighted aggregation of the values\n",
        "        v = self.value(x) # (B,T,C)\n",
        "        out = wei @ v # (B, T, T) @ (B, T, C) -> (B, T, C)\n",
        "        return out\n",
        "\n",
        "class MultiHeadAttention(nn.Module):\n",
        "    \"\"\" multiple heads of self-attention in parallel \"\"\"\n",
        "\n",
        "    def __init__(self, num_heads, head_size):\n",
        "        super().__init__()\n",
        "        self.heads = nn.ModuleList([Head(head_size) for _ in range(num_heads)])\n",
        "\n",
        "    def forward(self, x):\n",
        "        out = torch.cat([h(x) for h in self.heads], dim=-1)\n",
        "        return out\n",
        "\n",
        "class FeedFoward(nn.Module):\n",
        "    \"\"\" a simple linear layer followed by a non-linearity \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd):\n",
        "        super().__init__()\n",
        "        self.net = nn.Sequential(\n",
        "            nn.Linear(n_embd, n_embd),\n",
        "            nn.ReLU(),\n",
        "        )\n",
        "\n",
        "    def forward(self, x):\n",
        "        return self.net(x)\n",
        "\n",
        "class BigramLanguageModelV5(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        # each token directly reads off the logits for the next token from a lookup table\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.position_embedding_table = nn.Embedding(block_size, n_embd)\n",
        "        self.sa_head = MultiHeadAttention(4, n_embd//4)\n",
        "        self.ffwd = FeedFoward(n_embd)\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        B, T = idx.shape\n",
        "\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        tok_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        pos_emb = self.position_embedding_table(torch.arange(T, device=device)) # (T,C)\n",
        "        x = tok_emb + pos_emb # (B,T,C)\n",
        "        x = self.sa_head(x) # (B,T,C)\n",
        "        x = self.ffwd(x) # (B,T,C)\n",
        "        logits = self.lm_head(x) # (B,T,vocab_size)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            # crop idx to the last block_size tokens\n",
        "            idx_cond = idx[:, -block_size:]\n",
        "            # get the predictions\n",
        "            logits, loss = self(idx_cond)\n",
        "            # focus only on the last time step\n",
        "            logits = logits[:, -1, :] # becomes (B, C)\n",
        "            # apply softmax to get probabilities\n",
        "            probs = F.softmax(logits, dim=-1) # (B, C)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1) # (B, 1)\n",
        "            # append sampled index to the running sequence\n",
        "            idx = torch.cat((idx, idx_next), dim=1) # (B, T+1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV5()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "nzK_ReBhuc-v"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "ZppCxH5Quq71",
        "outputId": "7d7a2448-112d-4fb6-bf3c-e2ce70e5eca4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.7245, val loss 8.7244\n",
            "step 200: train loss 5.9322, val loss 6.0070\n",
            "step 400: train loss 5.8266, val loss 5.9011\n",
            "step 600: train loss 5.7290, val loss 5.8288\n",
            "step 800: train loss 5.6516, val loss 5.7436\n",
            "step 1000: train loss 5.5661, val loss 5.6951\n",
            "step 1200: train loss 5.4853, val loss 5.6336\n",
            "step 1400: train loss 5.4278, val loss 5.5612\n",
            "step 1600: train loss 5.3606, val loss 5.5107\n",
            "step 1800: train loss 5.3088, val loss 5.4978\n",
            "step 2000: train loss 5.2612, val loss 5.4259\n",
            "step 2200: train loss 5.2126, val loss 5.3818\n",
            "step 2400: train loss 5.1335, val loss 5.3526\n",
            "step 2600: train loss 5.1078, val loss 5.3182\n",
            "step 2800: train loss 5.0618, val loss 5.2801\n",
            "step 3000: train loss 4.9906, val loss 5.2677\n",
            "step 3200: train loss 4.9858, val loss 5.2147\n",
            "step 3400: train loss 4.9200, val loss 5.1967\n",
            "step 3600: train loss 4.8791, val loss 5.1844\n",
            "step 3800: train loss 4.8698, val loss 5.1164\n",
            "step 4000: train loss 4.8320, val loss 5.0981\n",
            "step 4200: train loss 4.7872, val loss 5.0873\n",
            "step 4400: train loss 4.7580, val loss 5.0523\n",
            "step 4600: train loss 4.7369, val loss 5.0305\n",
            "step 4800: train loss 4.7132, val loss 5.0148\n",
            "step 4999: train loss 4.6797, val loss 5.0033\n",
            "4.855108737945557\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "XHqlcogwush9",
        "outputId": "d9126e2b-4ada-4520-a7a0-8cb84f5a0d04"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "□□□□，□□□□□。\n",
            "□□□□□□。\n",
            "为分□，□□催照双溪浦，点月深深。\n",
            "画屏高驰浮。\n",
            "飞凉情社。\n",
            "风雨斗霏香，开果。\n",
            "□凤楼翻翠。\n",
            "正醉千里，尚泪回霜小。\n",
            "共傍茱萸嫣多安。\n",
            "痛更再生车寿。\n",
            "西园愁说。\n",
            "饮成鹅铅重倒。\n",
            "街棹琐筵、观尘枝信。\n",
            "遏御金髻。\n",
            "望乡遥。\n",
            "泪透铅云，边暗掩扬愁，烟华消雨单铃，著觉人间人。\n",
            "惊起春游双鬓。\n",
            "妙樵阑、试归来。\n",
            "可怜春正又怯涂。\n",
            "芝枝啼\n",
            "清漏声，花梢香红褪，残枝缓弄，尽载还间小队。\n",
            "憔悴双芝。\n",
            "归去还春城。\n",
            "无愠地隔峰无语，当日酿双何处，迟升高歌，尤嬉庐。\n",
            "幽春光滩初未玉。\n",
            "\n",
            "吴文英\n",
            "桂英香\n",
            "楼台月\n",
            "青玉妇人间，宿助莺眉夜，寒来气倦盟旅。\n",
            "\n",
            "程垓\n",
            "水调歌头\n",
            "江南古、这华齿锁新庭。\n",
            "沙红不数春日暮，空凝望。\n",
            "龙吟成可更无据。\n",
            "敌桃芳机花城。\n",
            "花酒，冰香起玉榴妆。\n",
            "是青楼谁伴，一笑酒绿草，飘遮。\n",
            "凭恨兰亭庆。\n",
            "金钏。\n",
            "尚有安是谁相思。\n",
            "破说阕春台过了。\n",
            "麾红枝，谁争开岁。\n",
            "\n",
            "无名氏\n",
            "失调名\n",
            "二华喜月朱颜。\n",
            "淇平生长恁是傲西。\n",
            "事不向芳游，胆宸洲未处，不写烟袅天门脸头，一阕三尊会，又瑶台欤。\n",
            "冻鬟荒蛩水，在作星台自有依依旧，千家岁清漪。\n",
            "花朱户倚射，万缕谁\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "class Head(nn.Module):\n",
        "    def __init__(self, head_size):\n",
        "        super().__init__()\n",
        "        self.key = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.query = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.value = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.register_buffer('tril', torch.tril(torch.ones(block_size, block_size)))\n",
        "\n",
        "    def forward(self, x):\n",
        "        B,T,C = x.shape\n",
        "        k = self.key(x)   # (B,T,C)\n",
        "        q = self.query(x) # (B,T,C)\n",
        "        # compute attention scores (\"affinities\")\n",
        "        wei = q @ k.transpose(-2,-1) * C**-0.5 # (B, T, C) @ (B, C, T) -> (B, T, T)\n",
        "        wei = wei.masked_fill(self.tril[:T, :T] == 0, float('-inf')) # (B, T, T)\n",
        "        wei = F.softmax(wei, dim=-1) # (B, T, T)\n",
        "\n",
        "        # perform the weighted aggregation of the values\n",
        "        v = self.value(x) # (B,T,C)\n",
        "        out = wei @ v # (B, T, T) @ (B, T, C) -> (B, T, C)\n",
        "        return out\n",
        "\n",
        "class MultiHeadAttention(nn.Module):\n",
        "    \"\"\" multiple heads of self-attention in parallel \"\"\"\n",
        "\n",
        "    def __init__(self, num_heads, head_size):\n",
        "        super().__init__()\n",
        "        self.heads = nn.ModuleList([Head(head_size) for _ in range(num_heads)])\n",
        "        self.proj = nn.Linear(n_embd, n_embd)\n",
        "\n",
        "    def forward(self, x):\n",
        "        out = torch.cat([h(x) for h in self.heads], dim=-1)\n",
        "        out = self.proj(out)\n",
        "        return out\n",
        "\n",
        "class FeedFoward(nn.Module):\n",
        "    \"\"\" a simple linear layer followed by a non-linearity \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd):\n",
        "        super().__init__()\n",
        "        self.net = nn.Sequential(\n",
        "            nn.Linear(n_embd, 4 * n_embd),\n",
        "            nn.ReLU(),\n",
        "            nn.Linear(4 * n_embd, n_embd)\n",
        "        )\n",
        "\n",
        "    def forward(self, x):\n",
        "        return self.net(x)\n",
        "\n",
        "class Block(nn.Module):\n",
        "    \"\"\" Transformer block: communication followed by computation \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd, n_head):\n",
        "        # n_embd: embedding dimension, n_head: the number of heads we'd like\n",
        "        super().__init__()\n",
        "        head_size = n_embd // n_head\n",
        "        self.sa = MultiHeadAttention(n_head, head_size)\n",
        "        self.ffwd = FeedFoward(n_embd)\n",
        "\n",
        "    def forward(self, x):\n",
        "        x = x + self.sa(x)\n",
        "        x = x + self.ffwd(x)\n",
        "        return x\n",
        "\n",
        "class BigramLanguageModelV6(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        # each token directly reads off the logits for the next token from a lookup table\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.position_embedding_table = nn.Embedding(block_size, n_embd)\n",
        "        self.blocks = nn.Sequential(\n",
        "            Block(n_embd, n_head=4),\n",
        "            Block(n_embd, n_head=4),\n",
        "            Block(n_embd, n_head=4),\n",
        "            nn.LayerNorm(n_embd)\n",
        "        )\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        B, T = idx.shape\n",
        "\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        tok_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        pos_emb = self.position_embedding_table(torch.arange(T, device=device)) # (T,C)\n",
        "        x = tok_emb + pos_emb # (B,T,C)\n",
        "        x = self.blocks(x) # (B,T,C)\n",
        "        logits = self.lm_head(x) # (B,T,vocab_size)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            # crop idx to the last block_size tokens\n",
        "            idx_cond = idx[:, -block_size:]\n",
        "            # get the predictions\n",
        "            logits, loss = self(idx_cond)\n",
        "            # focus only on the last time step\n",
        "            logits = logits[:, -1, :] # becomes (B, C)\n",
        "            # apply softmax to get probabilities\n",
        "            probs = F.softmax(logits, dim=-1) # (B, C)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1) # (B, 1)\n",
        "            # append sampled index to the running sequence\n",
        "            idx = torch.cat((idx, idx_next), dim=1) # (B, T+1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV6()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "Xi_9lPZrvA0x"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "wpKtkLj8vRMj",
        "outputId": "1ec3a02f-8c6a-4948-ae50-95e74f2a1e7d"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.8662, val loss 8.8696\n",
            "step 200: train loss 5.8161, val loss 5.8414\n",
            "step 400: train loss 5.5231, val loss 5.5496\n",
            "step 600: train loss 5.2725, val loss 5.3040\n",
            "step 800: train loss 5.1036, val loss 5.1578\n",
            "step 1000: train loss 4.9903, val loss 5.0687\n",
            "step 1200: train loss 4.9096, val loss 4.9531\n",
            "step 1400: train loss 4.8376, val loss 4.9228\n",
            "step 1600: train loss 4.7728, val loss 4.8692\n",
            "step 1800: train loss 4.7373, val loss 4.8079\n",
            "step 2000: train loss 4.6757, val loss 4.7559\n",
            "step 2200: train loss 4.6423, val loss 4.7148\n",
            "step 2400: train loss 4.5787, val loss 4.6786\n",
            "step 2600: train loss 4.5561, val loss 4.6337\n",
            "step 2800: train loss 4.5112, val loss 4.6111\n",
            "step 3000: train loss 4.4952, val loss 4.5726\n",
            "step 3200: train loss 4.4469, val loss 4.5780\n",
            "step 3400: train loss 4.4209, val loss 4.5063\n",
            "step 3600: train loss 4.4148, val loss 4.5208\n",
            "step 3800: train loss 4.3787, val loss 4.4849\n",
            "step 4000: train loss 4.3746, val loss 4.4686\n",
            "step 4200: train loss 4.3572, val loss 4.4593\n",
            "step 4400: train loss 4.3314, val loss 4.4377\n",
            "step 4600: train loss 4.2936, val loss 4.4021\n",
            "step 4800: train loss 4.2921, val loss 4.4091\n",
            "step 4999: train loss 4.2635, val loss 4.3780\n",
            "4.288609027862549\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "EJeLbPu0vSMU",
        "outputId": "28ccd37b-157e-40fc-da09-6b534fa293f4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "深深处、蓬莱一树，元戎悬季。\n",
            "孤情碧草色，眉宇。\n",
            "春酒归伴，便将玉、敲惊伴。\n",
            "江南枝上，诸真月明人远。\n",
            "忽起江光，风拂城头，悄无人，未殢盈盈息。\n",
            "渺渺云千，归程捐绕带江流正数。\n",
            "城外吴能入子，隔红云岸。\n",
            "为健尘埃，星斗星桥，一声徘徊。\n",
            "两似雕鞍都倚危回。\n",
            "花比厌中，一番香喷，暮色寒烟澹切，共醉醒、轻鸥未放。\n",
            "劝如今看，记绿阴头。\n",
            "春意休相，花时种就，桂只翻身。\n",
            "\n",
            "张炎\n",
            "浣溪沙\n",
            "斜阳涧草碧琉璃。\n",
            "六宫冰展手伴斟。\n",
            "莺声认语岸朱扉。\n",
            "行厨好处纤烟。\n",
            "应拥玉眉，不解攀芳。\n",
            "剪画堂台翦，西风清宴得儿。\n",
            "冰姿傍得，玉奴骢索。\n",
            "\n",
            "毛滂\n",
            "南歌子\n",
            "半点海棠花柳腰，软翻秋千绿出翠。\n",
            "便趁登高，银微绝木，秋光尚滴香尘。\n",
            "羲忍牧归欤。\n",
            "元磬和羹，看花你无花插不。\n",
            "刘郎凝受。\n",
            "眉儿虽从绿野。\n",
            "俊颂把轻吹底识，心自欲开筵进扶。\n",
            "要得向来即秋思。\n",
            "空馀发，别是清平。\n",
            "对溜儿、嫩萝日日三千八。\n",
            "仙家住，玉爱犹被，华间还带断，无功手。\n",
            "梦觉广平征辔处，痴重见、又是中天。\n",
            "\n",
            "姚勉\n",
            "水调歌头\n",
            "今古眼嵩微度，醉浑还到瑶宫。\n",
            "寂寞翠城西畔，争波压暖瑶池塘。\n",
            "人散青云西是远，似舞平戎。\n",
            "冶容饶己殿，再见金瓯。\n",
            "便是深恨，赏心重\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "class Head(nn.Module):\n",
        "    def __init__(self, head_size):\n",
        "        super().__init__()\n",
        "        self.key = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.query = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.value = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.register_buffer('tril', torch.tril(torch.ones(block_size, block_size)))\n",
        "\n",
        "    def forward(self, x):\n",
        "        B,T,C = x.shape\n",
        "        k = self.key(x)   # (B,T,C)\n",
        "        q = self.query(x) # (B,T,C)\n",
        "        # compute attention scores (\"affinities\")\n",
        "        wei = q @ k.transpose(-2,-1) * C**-0.5 # (B, T, C) @ (B, C, T) -> (B, T, T)\n",
        "        wei = wei.masked_fill(self.tril[:T, :T] == 0, float('-inf')) # (B, T, T)\n",
        "        wei = F.softmax(wei, dim=-1) # (B, T, T)\n",
        "\n",
        "        # perform the weighted aggregation of the values\n",
        "        v = self.value(x) # (B,T,C)\n",
        "        out = wei @ v # (B, T, T) @ (B, T, C) -> (B, T, C)\n",
        "        return out\n",
        "\n",
        "class MultiHeadAttention(nn.Module):\n",
        "    \"\"\" multiple heads of self-attention in parallel \"\"\"\n",
        "\n",
        "    def __init__(self, num_heads, head_size):\n",
        "        super().__init__()\n",
        "        self.heads = nn.ModuleList([Head(head_size) for _ in range(num_heads)])\n",
        "        self.proj = nn.Linear(n_embd, n_embd)\n",
        "\n",
        "    def forward(self, x):\n",
        "        out = torch.cat([h(x) for h in self.heads], dim=-1)\n",
        "        out = self.proj(out)\n",
        "        return out\n",
        "\n",
        "class FeedFoward(nn.Module):\n",
        "    \"\"\" a simple linear layer followed by a non-linearity \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd):\n",
        "        super().__init__()\n",
        "        self.net = nn.Sequential(\n",
        "            nn.Linear(n_embd, 4 * n_embd),\n",
        "            nn.ReLU(),\n",
        "            nn.Linear(4 * n_embd, n_embd)\n",
        "        )\n",
        "\n",
        "    def forward(self, x):\n",
        "        return self.net(x)\n",
        "\n",
        "class Block(nn.Module):\n",
        "    \"\"\" Transformer block: communication followed by computation \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd, n_head):\n",
        "        # n_embd: embedding dimension, n_head: the number of heads we'd like\n",
        "        super().__init__()\n",
        "        head_size = n_embd // n_head\n",
        "        self.sa = MultiHeadAttention(n_head, head_size)\n",
        "        self.ffwd = FeedFoward(n_embd)\n",
        "        self.ln1 = nn.LayerNorm(n_embd)\n",
        "        self.ln2 = nn.LayerNorm(n_embd)\n",
        "\n",
        "    def forward(self, x):\n",
        "        x = x + self.sa(self.ln1(x))\n",
        "        x = x + self.ffwd(self.ln2(x))\n",
        "        return x\n",
        "\n",
        "class BigramLanguageModelV7(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        # each token directly reads off the logits for the next token from a lookup table\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.position_embedding_table = nn.Embedding(block_size, n_embd)\n",
        "        self.blocks = nn.Sequential(\n",
        "            Block(n_embd, n_head=4),\n",
        "            Block(n_embd, n_head=4),\n",
        "            Block(n_embd, n_head=4),\n",
        "            nn.LayerNorm(n_embd)\n",
        "        )\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        B, T = idx.shape\n",
        "\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        tok_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        pos_emb = self.position_embedding_table(torch.arange(T, device=device)) # (T,C)\n",
        "        x = tok_emb + pos_emb # (B,T,C)\n",
        "        x = self.blocks(x) # (B,T,C)\n",
        "        logits = self.lm_head(x) # (B,T,vocab_size)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            # crop idx to the last block_size tokens\n",
        "            idx_cond = idx[:, -block_size:]\n",
        "            # get the predictions\n",
        "            logits, loss = self(idx_cond)\n",
        "            # focus only on the last time step\n",
        "            logits = logits[:, -1, :] # becomes (B, C)\n",
        "            # apply softmax to get probabilities\n",
        "            probs = F.softmax(logits, dim=-1) # (B, C)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1) # (B, 1)\n",
        "            # append sampled index to the running sequence\n",
        "            idx = torch.cat((idx, idx_next), dim=1) # (B, T+1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV7()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "f-MSAN30wunl"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "qG-Seg44w-OR",
        "outputId": "3203448a-7a18-42e3-8d97-da7d0a743f2c"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.8566, val loss 8.8574\n",
            "step 200: train loss 5.8440, val loss 5.9292\n",
            "step 400: train loss 5.5149, val loss 5.6404\n",
            "step 600: train loss 5.3087, val loss 5.4343\n",
            "step 800: train loss 5.1243, val loss 5.3059\n",
            "step 1000: train loss 5.0037, val loss 5.2057\n",
            "step 1200: train loss 4.9017, val loss 5.1421\n",
            "step 1400: train loss 4.8522, val loss 5.0816\n",
            "step 1600: train loss 4.7920, val loss 5.0178\n",
            "step 1800: train loss 4.7513, val loss 4.9742\n",
            "step 2000: train loss 4.7066, val loss 4.9432\n",
            "step 2200: train loss 4.6272, val loss 4.9160\n",
            "step 2400: train loss 4.6132, val loss 4.8907\n",
            "step 2600: train loss 4.5942, val loss 4.8652\n",
            "step 2800: train loss 4.5565, val loss 4.8357\n",
            "step 3000: train loss 4.5068, val loss 4.7992\n",
            "step 3200: train loss 4.4813, val loss 4.7798\n",
            "step 3400: train loss 4.4626, val loss 4.7698\n",
            "step 3600: train loss 4.4130, val loss 4.7388\n",
            "step 3800: train loss 4.3979, val loss 4.7061\n",
            "step 4000: train loss 4.3959, val loss 4.6885\n",
            "step 4200: train loss 4.3535, val loss 4.6801\n",
            "step 4400: train loss 4.3122, val loss 4.6583\n",
            "step 4600: train loss 4.3240, val loss 4.6473\n",
            "step 4800: train loss 4.3022, val loss 4.6453\n",
            "step 4999: train loss 4.2793, val loss 4.5897\n",
            "4.279220104217529\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "M15_MnsAxBV0",
        "outputId": "40ac69c8-e492-4fd3-c056-9af81689015f"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "惜何处、践凝望。\n",
            "鲸平细柳，有人是、又还使宅。\n",
            "\n",
            "豚己洽\n",
            "醉蓬莱\n",
            "千户玉簪，笑拍桃花蕊，看几时，碧紫裀格。\n",
            "相逢院落奇和，愁多清集。\n",
            "千葩暮暮，对红楼、春无重省。\n",
            "欲说眉尖相还，春光好、满缁常记。\n",
            "冲柳蝶黄，洗罢堆香鸳甃院。\n",
            "谁道绕床头意。\n",
            "听酒成高度。\n",
            "也甚重春，昨宵不肯，一番人市。\n",
            "风前亭午，未识两行潘邪。\n",
            "今番后日，贞舌不拘赶。\n",
            "看来洞门深、金蹀躞，如人知是江南国。\n",
            "数阕事，任棹动、青刍。\n",
            "此时、何处在闲云散，白日趋名例。\n",
            "黯旧时，还知道意，将伊触。\n",
            "老去好为人闲事，更趁音魂处处。\n",
            "倚朱裳，梦魂相顾。\n",
            "身他只许，都是旧年此际。\n",
            "曹奴一点，无是行人，不识。\n",
            "故没照。\n",
            "扫地久，狂鱼肥，双鬓无情意自觉。\n",
            "烛堪惜。\n",
            "何时。\n",
            "柔图画图画战，小损青藜，细分才峭。\n",
            "啼鸟永牵歌，戏，楼书中夜，谁家晓。\n",
            "不见尊前，十君换造溪汤饼。\n",
            "今朝客，椒裳清柱。\n",
            "\n",
            "宋松\n",
            "水龙吟\n",
            "绿上梨花，已无情短，心如斗瘦，应是春无主。\n",
            "欺度媚霜风，宝篆新声催。\n",
            "绛阙清秋，宝香逗。\n",
            "雁声清庙不肯，地里尊罍。\n",
            "不能祸，浑是今年路，回首颓环。\n",
            "押日垂杨，尚羁风、白衣初歇，薄帆三五色。\n",
            "\n",
            "朱敦儒\n",
            "摸鱼儿\n",
            "红笺轻拂晓来、清春晚画寒分\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "n_head = 4\n",
        "n_layer = 4\n",
        "dropout = 0.2\n",
        "class Head(nn.Module):\n",
        "    def __init__(self, head_size):\n",
        "        super().__init__()\n",
        "        self.key = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.query = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.value = nn.Linear(n_embd, head_size, bias=False)\n",
        "        self.register_buffer('tril', torch.tril(torch.ones(block_size, block_size)))\n",
        "\n",
        "        self.dropout = nn.Dropout(dropout)\n",
        "\n",
        "    def forward(self, x):\n",
        "        B,T,C = x.shape\n",
        "        k = self.key(x)   # (B,T,C)\n",
        "        q = self.query(x) # (B,T,C)\n",
        "        # compute attention scores (\"affinities\")\n",
        "        wei = q @ k.transpose(-2,-1) * C**-0.5 # (B, T, C) @ (B, C, T) -> (B, T, T)\n",
        "        wei = wei.masked_fill(self.tril[:T, :T] == 0, float('-inf')) # (B, T, T)\n",
        "        wei = F.softmax(wei, dim=-1) # (B, T, T)\n",
        "\n",
        "        # dropout\n",
        "        wei = self.dropout(wei)\n",
        "\n",
        "        # perform the weighted aggregation of the values\n",
        "        v = self.value(x) # (B,T,C)\n",
        "        out = wei @ v # (B, T, T) @ (B, T, C) -> (B, T, C)\n",
        "        return out\n",
        "\n",
        "class MultiHeadAttention(nn.Module):\n",
        "    \"\"\" multiple heads of self-attention in parallel \"\"\"\n",
        "\n",
        "    def __init__(self, num_heads, head_size):\n",
        "        super().__init__()\n",
        "        self.heads = nn.ModuleList([Head(head_size) for _ in range(num_heads)])\n",
        "        self.proj = nn.Linear(n_embd, n_embd)\n",
        "        self.dropout = nn.Dropout(dropout)\n",
        "\n",
        "    def forward(self, x):\n",
        "        out = torch.cat([h(x) for h in self.heads], dim=-1)\n",
        "        out = self.dropout(self.proj(out))\n",
        "        return out\n",
        "\n",
        "class FeedFoward(nn.Module):\n",
        "    \"\"\" a simple linear layer followed by a non-linearity \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd):\n",
        "        super().__init__()\n",
        "        self.net = nn.Sequential(\n",
        "            nn.Linear(n_embd, 4 * n_embd),\n",
        "            nn.ReLU(),\n",
        "            nn.Linear(4 * n_embd, n_embd),\n",
        "            nn.Dropout(dropout),\n",
        "        )\n",
        "\n",
        "    def forward(self, x):\n",
        "        return self.net(x)\n",
        "\n",
        "class Block(nn.Module):\n",
        "    \"\"\" Transformer block: communication followed by computation \"\"\"\n",
        "\n",
        "    def __init__(self, n_embd, n_head):\n",
        "        # n_embd: embedding dimension, n_head: the number of heads we'd like\n",
        "        super().__init__()\n",
        "        head_size = n_embd // n_head\n",
        "        self.sa = MultiHeadAttention(n_head, head_size)\n",
        "        self.ffwd = FeedFoward(n_embd)\n",
        "        self.ln1 = nn.LayerNorm(n_embd)\n",
        "        self.ln2 = nn.LayerNorm(n_embd)\n",
        "\n",
        "    def forward(self, x):\n",
        "        x = x + self.sa(self.ln1(x))\n",
        "        x = x + self.ffwd(self.ln2(x))\n",
        "        return x\n",
        "\n",
        "class BigramLanguageModelV8(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        # each token directly reads off the logits for the next token from a lookup table\n",
        "        self.token_embedding_table = nn.Embedding(vocab_size, n_embd)\n",
        "        self.position_embedding_table = nn.Embedding(block_size, n_embd)\n",
        "        self.blocks = nn.Sequential(*[Block(n_embd, n_head=n_head) for _ in range(n_layer)])\n",
        "        self.ln_f = nn.LayerNorm(n_embd) # final layer norm\n",
        "        self.lm_head = nn.Linear(n_embd, vocab_size)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        B, T = idx.shape\n",
        "\n",
        "        # idx and targets are both (B,T) tensor of integers\n",
        "        tok_emb = self.token_embedding_table(idx) # (B,T,C)\n",
        "        pos_emb = self.position_embedding_table(torch.arange(T, device=device)) # (T,C)\n",
        "        x = tok_emb + pos_emb # (B,T,C)\n",
        "        x = self.blocks(x) # (B,T,C)\n",
        "        x = self.ln_f(x) # (B,T,C)\n",
        "\n",
        "        logits = self.lm_head(x) # (B,T,vocab_size)\n",
        "\n",
        "        if targets is None:\n",
        "            loss = None\n",
        "        else:\n",
        "            B, T, C = logits.shape\n",
        "            logits = logits.view(B*T, C)\n",
        "            targets = targets.view(B*T)\n",
        "            loss = F.cross_entropy(logits, targets)\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def generate(self, idx, max_new_tokens):\n",
        "        # idx is (B, T) array of indices in the current context\n",
        "        for _ in range(max_new_tokens):\n",
        "            # crop idx to the last block_size tokens\n",
        "            idx_cond = idx[:, -block_size:]\n",
        "            # get the predictions\n",
        "            logits, loss = self(idx_cond)\n",
        "            # focus only on the last time step\n",
        "            logits = logits[:, -1, :] # becomes (B, C)\n",
        "            # apply softmax to get probabilities\n",
        "            probs = F.softmax(logits, dim=-1) # (B, C)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1) # (B, 1)\n",
        "            # append sampled index to the running sequence\n",
        "            idx = torch.cat((idx, idx_next), dim=1) # (B, T+1)\n",
        "        return idx\n",
        "model = BigramLanguageModelV8()\n",
        "model = model.to(device)"
      ],
      "metadata": {
        "id": "TWKLYf71xmsP"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "print(sum(p.numel() for p in model.parameters())/1e6, 'M parameters')"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "fLxZHpAUydW5",
        "outputId": "e84ee578-f893-49a8-c66c-8466967edff2"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "2.378751 M parameters\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "hisATr3ryZAk",
        "outputId": "c96f7920-7316-43ef-c877-515a775106dd"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.8521, val loss 8.8524\n",
            "step 200: train loss 5.8701, val loss 5.9393\n",
            "step 400: train loss 5.5867, val loss 5.6998\n",
            "step 600: train loss 5.3631, val loss 5.5106\n",
            "step 800: train loss 5.1859, val loss 5.3682\n",
            "step 1000: train loss 5.0704, val loss 5.2658\n",
            "step 1200: train loss 4.9547, val loss 5.1857\n",
            "step 1400: train loss 4.9050, val loss 5.1157\n",
            "step 1600: train loss 4.8418, val loss 5.0567\n",
            "step 1800: train loss 4.7978, val loss 5.0270\n",
            "step 2000: train loss 4.7419, val loss 4.9886\n",
            "step 2200: train loss 4.6765, val loss 4.9350\n",
            "step 2400: train loss 4.6757, val loss 4.9174\n",
            "step 2600: train loss 4.6328, val loss 4.8971\n",
            "step 2800: train loss 4.5946, val loss 4.8632\n",
            "step 3000: train loss 4.5528, val loss 4.8426\n",
            "step 3200: train loss 4.5180, val loss 4.8211\n",
            "step 3400: train loss 4.4937, val loss 4.8146\n",
            "step 3600: train loss 4.4791, val loss 4.7712\n",
            "step 3800: train loss 4.4547, val loss 4.7465\n",
            "step 4000: train loss 4.4199, val loss 4.7199\n",
            "step 4200: train loss 4.4064, val loss 4.7196\n",
            "step 4400: train loss 4.3787, val loss 4.6820\n",
            "step 4600: train loss 4.3357, val loss 4.6559\n",
            "step 4800: train loss 4.3314, val loss 4.6351\n",
            "step 4999: train loss 4.3153, val loss 4.6564\n",
            "4.35280179977417\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=500)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "WaaXzGr7yiey",
        "outputId": "c16bfeca-af66-4e19-d40a-55d5e24a5b3d"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "知此寿阳关千字，绣被更尖□□流山。\n",
            "不信得、初尝满城。\n",
            "人间在磨告，尽口澄曾好语、玉梅弄艳，朦胧通。\n",
            "海棠环城新几，高枝影面，长为传觞。\n",
            "飞去、知院叶竹，又是一娥来管，更说思今空望帐。\n",
            "愿酒杯盘，坐蛾曳断，空应泛棹。\n",
            "□板醉堂如事，误归来、春浓面。\n",
            "江村高挂，登临诗。\n",
            "\n",
            "杨泽民\n",
            "长啸芝\n",
            "纤风紧破，紫芝、轻寒犹峭。\n",
            "日清池院里、愁向盘滨。\n",
            "福禄绿，欲寻幽、玉箫声又得，花繁乱高鸦一色。\n",
            "恰是道，斥角重宴，百唤花时，但常月华堂长。\n",
            "天一百案夫苦，银除毕竟输。\n",
            "\n",
            "朱敦儒\n",
            "凤栖梧・赵鼎\n",
            "渡朝中朝春令\n",
            "水鉴红千长是山无。\n",
            "启地如分舆，斜阳在正制、经过清房。\n",
            "夜将坡凤美横巢。\n",
            "人物一场发。\n",
            "却怪伊才。\n",
            "待见彭典刑。\n",
            "长似殊情蹉跎。\n",
            "\n",
            "刘郎归\n",
            "黄昏\n",
            "一叶犁合冰香，四生凉。\n",
            "门外浙章花片片清冰。\n",
            "百尺芦花盛月蹊。\n",
            "铁娆移城重折似，香馨共频荣。\n",
            "相望，山云坠双行空。\n",
            "追梦楼上无媒笑。\n",
            "老尽平野玉，表里庭榭秉，对妆。\n",
            "灼中醒令点数弄彻，绣帏滴斗，满城飞去眠眼多扶。\n",
            "门竹外、销。\n",
            "人在不知春早总相宜。\n",
            "但回首。\n",
            "无凝夜夜，春庭香、波分凝。\n",
            "天香里、柔条老，何为伴何处，且歌十水没处。\n",
            "\n",
            "张炎\n",
            "点平谣乐\n",
            "去觞。\n",
            "\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "n_head = 12\n",
        "n_layer = 12\n",
        "n_embd = 768\n",
        "model = BigramLanguageModelV8()\n",
        "model = model.to(device)\n",
        "print(sum(p.numel() for p in model.parameters())/1e6, 'M parameters')\n",
        "print(\"torch.cuda.memory_reserved: %fGB\"%(torch.cuda.memory_reserved(0)/1024/1024/1024))\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "-uVfDJBxzVQK",
        "outputId": "b1de438e-3445-4d65-e6e0-0710658468be"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "94.519295 M parameters\n",
            "torch.cuda.memory_reserved: 1.212891GB\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "train(model)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 637
        },
        "id": "Fk0liv7wz40f",
        "outputId": "52fc5f79-ebb9-4df2-c1b7-932a8461af0a"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "step 0: train loss 8.8014, val loss 8.7932\n",
            "step 200: train loss 5.9427, val loss 6.0196\n",
            "step 400: train loss 5.7862, val loss 5.8831\n",
            "step 600: train loss 5.6623, val loss 5.7723\n",
            "step 800: train loss 5.5708, val loss 5.6780\n",
            "step 1000: train loss 5.4644, val loss 5.5889\n",
            "step 1200: train loss 5.4436, val loss 5.5775\n",
            "step 1400: train loss 5.3782, val loss 5.5452\n",
            "step 1600: train loss 5.3681, val loss 5.5230\n",
            "step 1800: train loss 5.3716, val loss 5.5259\n",
            "step 2000: train loss 5.3851, val loss 5.5239\n",
            "step 2200: train loss 5.4008, val loss 5.5511\n",
            "step 2400: train loss 5.5327, val loss 5.6457\n",
            "step 2600: train loss 5.5824, val loss 5.6849\n",
            "step 2800: train loss 5.5278, val loss 5.6565\n",
            "step 3000: train loss 5.4988, val loss 5.6328\n",
            "step 3200: train loss 5.5318, val loss 5.6553\n",
            "step 3400: train loss 5.6370, val loss 5.7393\n"
          ]
        },
        {
          "output_type": "error",
          "ename": "KeyboardInterrupt",
          "evalue": "ignored",
          "traceback": [
            "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
            "\u001b[0;32m<ipython-input-59-9d3046b5d0d4>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtrain\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
            "\u001b[0;32m<ipython-input-21-3c40d02d41fa>\u001b[0m in \u001b[0;36mtrain\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m     27\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     28\u001b[0m       \u001b[0;31m# evaluate the loss\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 29\u001b[0;31m       \u001b[0mlogits\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloss\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mxb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0myb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     30\u001b[0m       \u001b[0moptimizer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mzero_grad\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mset_to_none\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     31\u001b[0m       \u001b[0mloss\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1516\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_compiled_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# type: ignore[misc]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1517\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1518\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1519\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1520\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1525\u001b[0m                 \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_pre_hooks\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_hooks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1526\u001b[0m                 or _global_forward_hooks or _global_forward_pre_hooks):\n\u001b[0;32m-> 1527\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mforward_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1528\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1529\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m<ipython-input-50-ae9be5a3d536>\u001b[0m in \u001b[0;36mforward\u001b[0;34m(self, idx, targets)\u001b[0m\n\u001b[1;32m     93\u001b[0m         \u001b[0mpos_emb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mposition_embedding_table\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0marange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdevice\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdevice\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# (T,C)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     94\u001b[0m         \u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtok_emb\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mpos_emb\u001b[0m \u001b[0;31m# (B,T,C)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 95\u001b[0;31m         \u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mblocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# (B,T,C)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     96\u001b[0m         \u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mln_f\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# (B,T,C)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     97\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1516\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_compiled_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# type: ignore[misc]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1517\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1518\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1519\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1520\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1525\u001b[0m                 \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_pre_hooks\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_hooks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1526\u001b[0m                 or _global_forward_hooks or _global_forward_pre_hooks):\n\u001b[0;32m-> 1527\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mforward_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1528\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1529\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/container.py\u001b[0m in \u001b[0;36mforward\u001b[0;34m(self, input)\u001b[0m\n\u001b[1;32m    213\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mforward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mfor\u001b[0m \u001b[0mmodule\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m             \u001b[0minput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodule\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    216\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    217\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1516\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_compiled_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# type: ignore[misc]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1517\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1518\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1519\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1520\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1525\u001b[0m                 \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_pre_hooks\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_hooks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1526\u001b[0m                 or _global_forward_hooks or _global_forward_pre_hooks):\n\u001b[0;32m-> 1527\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mforward_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1528\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1529\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m<ipython-input-50-ae9be5a3d536>\u001b[0m in \u001b[0;36mforward\u001b[0;34m(self, x)\u001b[0m\n\u001b[1;32m     71\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     72\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mforward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 73\u001b[0;31m         \u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msa\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mln1\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     74\u001b[0m         \u001b[0mx\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mffwd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mln2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     75\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1516\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_compiled_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# type: ignore[misc]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1517\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1518\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1519\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1520\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1525\u001b[0m                 \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_pre_hooks\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_hooks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1526\u001b[0m                 or _global_forward_hooks or _global_forward_pre_hooks):\n\u001b[0;32m-> 1527\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mforward_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1528\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1529\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m<ipython-input-50-ae9be5a3d536>\u001b[0m in \u001b[0;36mforward\u001b[0;34m(self, x)\u001b[0m\n\u001b[1;32m     39\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     40\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mforward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 41\u001b[0;31m         \u001b[0mout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mh\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mh\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mheads\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdim\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     42\u001b[0m         \u001b[0mout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdropout\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproj\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     43\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mout\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m<ipython-input-50-ae9be5a3d536>\u001b[0m in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m     39\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     40\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mforward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 41\u001b[0;31m         \u001b[0mout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mh\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mh\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mheads\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdim\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     42\u001b[0m         \u001b[0mout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdropout\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproj\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     43\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mout\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_wrapped_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1516\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_compiled_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m  \u001b[0;31m# type: ignore[misc]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1517\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1518\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1519\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1520\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_call_impl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m_call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m   1525\u001b[0m                 \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_pre_hooks\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0m_global_backward_hooks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1526\u001b[0m                 or _global_forward_hooks or _global_forward_pre_hooks):\n\u001b[0;32m-> 1527\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mforward_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1528\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1529\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m<ipython-input-50-ae9be5a3d536>\u001b[0m in \u001b[0;36mforward\u001b[0;34m(self, x)\u001b[0m\n\u001b[1;32m     25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     26\u001b[0m         \u001b[0;31m# perform the weighted aggregation of the values\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 27\u001b[0;31m         \u001b[0mv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# (B,T,C)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     28\u001b[0m         \u001b[0mout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mwei\u001b[0m \u001b[0;34m@\u001b[0m \u001b[0mv\u001b[0m \u001b[0;31m# (B, T, T) @ (B, T, C) -> (B, T, C)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     29\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mout\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m   1683\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0;34m'_parameters'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__dict__\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1684\u001b[0m             \u001b[0m_parameters\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__dict__\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'_parameters'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1685\u001b[0;31m             \u001b[0;32mif\u001b[0m \u001b[0mname\u001b[0m \u001b[0;32min\u001b[0m \u001b[0m_parameters\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1686\u001b[0m                 \u001b[0;32mreturn\u001b[0m \u001b[0m_parameters\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1687\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0;34m'_buffers'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__dict__\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!git lfs install\n",
        "\n",
        "!git clone https://huggingface.co/HenryJJ/nanoGPT-songci"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "0y7Mn0aO2AVN",
        "outputId": "4598395d-0b3d-4333-c0f7-52cb7782a6ff"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Git LFS initialized.\n",
            "Cloning into 'nanoGPT-songci'...\n",
            "remote: Enumerating objects: 14, done.\u001b[K\n",
            "remote: Counting objects: 100% (11/11), done.\u001b[K\n",
            "remote: Compressing objects: 100% (10/10), done.\u001b[K\n",
            "remote: Total 14 (delta 0), reused 0 (delta 0), pack-reused 3\u001b[K\n",
            "Unpacking objects: 100% (14/14), 2.74 MiB | 5.33 MiB/s, done.\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import math\n",
        "import inspect\n",
        "from dataclasses import dataclass\n",
        "\n",
        "import torch\n",
        "import torch.nn as nn\n",
        "from torch.nn import functional as F\n",
        "\n",
        "class LayerNorm(nn.Module):\n",
        "    \"\"\" LayerNorm but with an optional bias. PyTorch doesn't support simply bias=False \"\"\"\n",
        "\n",
        "    def __init__(self, ndim, bias):\n",
        "        super().__init__()\n",
        "        self.weight = nn.Parameter(torch.ones(ndim))\n",
        "        self.bias = nn.Parameter(torch.zeros(ndim)) if bias else None\n",
        "\n",
        "    def forward(self, input):\n",
        "        return F.layer_norm(input, self.weight.shape, self.weight, self.bias, 1e-5)\n",
        "\n",
        "class CausalSelfAttention(nn.Module):\n",
        "\n",
        "    def __init__(self, config):\n",
        "        super().__init__()\n",
        "        assert config.n_embd % config.n_head == 0\n",
        "        # key, query, value projections for all heads, but in a batch\n",
        "        self.c_attn = nn.Linear(config.n_embd, 3 * config.n_embd, bias=config.bias)\n",
        "        # output projection\n",
        "        self.c_proj = nn.Linear(config.n_embd, config.n_embd, bias=config.bias)\n",
        "        # regularization\n",
        "        self.attn_dropout = nn.Dropout(config.dropout)\n",
        "        self.resid_dropout = nn.Dropout(config.dropout)\n",
        "        self.n_head = config.n_head\n",
        "        self.n_embd = config.n_embd\n",
        "        self.dropout = config.dropout\n",
        "        # flash attention make GPU go brrrrr but support is only in PyTorch >= 2.0\n",
        "        self.flash = hasattr(torch.nn.functional, 'scaled_dot_product_attention')\n",
        "        if not self.flash:\n",
        "            print(\"WARNING: using slow attention. Flash Attention requires PyTorch >= 2.0\")\n",
        "            # causal mask to ensure that attention is only applied to the left in the input sequence\n",
        "            self.register_buffer(\"bias\", torch.tril(torch.ones(config.block_size, config.block_size))\n",
        "                                        .view(1, 1, config.block_size, config.block_size))\n",
        "\n",
        "    def forward(self, x):\n",
        "        B, T, C = x.size() # batch size, sequence length, embedding dimensionality (n_embd)\n",
        "\n",
        "        # calculate query, key, values for all heads in batch and move head forward to be the batch dim\n",
        "        q, k, v  = self.c_attn(x).split(self.n_embd, dim=2)\n",
        "        k = k.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)\n",
        "        q = q.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)\n",
        "        v = v.view(B, T, self.n_head, C // self.n_head).transpose(1, 2) # (B, nh, T, hs)\n",
        "\n",
        "        # causal self-attention; Self-attend: (B, nh, T, hs) x (B, nh, hs, T) -> (B, nh, T, T)\n",
        "        if self.flash:\n",
        "            # efficient attention using Flash Attention CUDA kernels\n",
        "            y = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=None, dropout_p=self.dropout if self.training else 0, is_causal=True)\n",
        "        else:\n",
        "            # manual implementation of attention\n",
        "            att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1)))\n",
        "            att = att.masked_fill(self.bias[:,:,:T,:T] == 0, float('-inf'))\n",
        "            att = F.softmax(att, dim=-1)\n",
        "            att = self.attn_dropout(att)\n",
        "            y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs)\n",
        "        y = y.transpose(1, 2).contiguous().view(B, T, C) # re-assemble all head outputs side by side\n",
        "\n",
        "        # output projection\n",
        "        y = self.resid_dropout(self.c_proj(y))\n",
        "        return y\n",
        "\n",
        "class MLP(nn.Module):\n",
        "\n",
        "    def __init__(self, config):\n",
        "        super().__init__()\n",
        "        self.c_fc    = nn.Linear(config.n_embd, 4 * config.n_embd, bias=config.bias)\n",
        "        self.gelu    = nn.GELU()\n",
        "        self.c_proj  = nn.Linear(4 * config.n_embd, config.n_embd, bias=config.bias)\n",
        "        self.dropout = nn.Dropout(config.dropout)\n",
        "\n",
        "    def forward(self, x):\n",
        "        x = self.c_fc(x)\n",
        "        x = self.gelu(x)\n",
        "        x = self.c_proj(x)\n",
        "        x = self.dropout(x)\n",
        "        return x\n",
        "\n",
        "class Block(nn.Module):\n",
        "\n",
        "    def __init__(self, config):\n",
        "        super().__init__()\n",
        "        self.ln_1 = LayerNorm(config.n_embd, bias=config.bias)\n",
        "        self.attn = CausalSelfAttention(config)\n",
        "        self.ln_2 = LayerNorm(config.n_embd, bias=config.bias)\n",
        "        self.mlp = MLP(config)\n",
        "\n",
        "    def forward(self, x):\n",
        "        x = x + self.attn(self.ln_1(x))\n",
        "        x = x + self.mlp(self.ln_2(x))\n",
        "        return x\n",
        "\n",
        "@dataclass\n",
        "class GPTConfig:\n",
        "    block_size: int = 1024\n",
        "    vocab_size: int = 50304 # GPT-2 vocab_size of 50257, padded up to nearest multiple of 64 for efficiency\n",
        "    n_layer: int = 12\n",
        "    n_head: int = 12\n",
        "    n_embd: int = 768\n",
        "    dropout: float = 0.0\n",
        "    bias: bool = True # True: bias in Linears and LayerNorms, like GPT-2. False: a bit better and faster\n",
        "\n",
        "class GPT(nn.Module):\n",
        "\n",
        "    def __init__(self, config):\n",
        "        super().__init__()\n",
        "        assert config.vocab_size is not None\n",
        "        assert config.block_size is not None\n",
        "        self.config = config\n",
        "\n",
        "        self.transformer = nn.ModuleDict(dict(\n",
        "            wte = nn.Embedding(config.vocab_size, config.n_embd),\n",
        "            wpe = nn.Embedding(config.block_size, config.n_embd),\n",
        "            drop = nn.Dropout(config.dropout),\n",
        "            h = nn.ModuleList([Block(config) for _ in range(config.n_layer)]),\n",
        "            ln_f = LayerNorm(config.n_embd, bias=config.bias),\n",
        "        ))\n",
        "        self.lm_head = nn.Linear(config.n_embd, config.vocab_size, bias=False)\n",
        "        # with weight tying when using torch.compile() some warnings get generated:\n",
        "        # \"UserWarning: functional_call was passed multiple values for tied weights.\n",
        "        # This behavior is deprecated and will be an error in future versions\"\n",
        "        # not 100% sure what this is, so far seems to be harmless. TODO investigate\n",
        "        self.transformer.wte.weight = self.lm_head.weight # https://paperswithcode.com/method/weight-tying\n",
        "\n",
        "        # init all weights\n",
        "        self.apply(self._init_weights)\n",
        "        # apply special scaled init to the residual projections, per GPT-2 paper\n",
        "        for pn, p in self.named_parameters():\n",
        "            if pn.endswith('c_proj.weight'):\n",
        "                torch.nn.init.normal_(p, mean=0.0, std=0.02/math.sqrt(2 * config.n_layer))\n",
        "\n",
        "        # report number of parameters\n",
        "        print(\"number of parameters: %.2fM\" % (self.get_num_params()/1e6,))\n",
        "\n",
        "    def get_num_params(self, non_embedding=True):\n",
        "        \"\"\"\n",
        "        Return the number of parameters in the model.\n",
        "        For non-embedding count (default), the position embeddings get subtracted.\n",
        "        The token embeddings would too, except due to the parameter sharing these\n",
        "        params are actually used as weights in the final layer, so we include them.\n",
        "        \"\"\"\n",
        "        n_params = sum(p.numel() for p in self.parameters())\n",
        "        if non_embedding:\n",
        "            n_params -= self.transformer.wpe.weight.numel()\n",
        "        return n_params\n",
        "\n",
        "    def _init_weights(self, module):\n",
        "        if isinstance(module, nn.Linear):\n",
        "            torch.nn.init.normal_(module.weight, mean=0.0, std=0.02)\n",
        "            if module.bias is not None:\n",
        "                torch.nn.init.zeros_(module.bias)\n",
        "        elif isinstance(module, nn.Embedding):\n",
        "            torch.nn.init.normal_(module.weight, mean=0.0, std=0.02)\n",
        "\n",
        "    def forward(self, idx, targets=None):\n",
        "        device = idx.device\n",
        "        b, t = idx.size()\n",
        "        assert t <= self.config.block_size, f\"Cannot forward sequence of length {t}, block size is only {self.config.block_size}\"\n",
        "        pos = torch.arange(0, t, dtype=torch.long, device=device) # shape (t)\n",
        "\n",
        "        # forward the GPT model itself\n",
        "        tok_emb = self.transformer.wte(idx) # token embeddings of shape (b, t, n_embd)\n",
        "        pos_emb = self.transformer.wpe(pos) # position embeddings of shape (t, n_embd)\n",
        "        x = self.transformer.drop(tok_emb + pos_emb)\n",
        "        for block in self.transformer.h:\n",
        "            x = block(x)\n",
        "        x = self.transformer.ln_f(x)\n",
        "\n",
        "        if targets is not None:\n",
        "            # if we are given some desired targets also calculate the loss\n",
        "            logits = self.lm_head(x)\n",
        "            loss = F.cross_entropy(logits.view(-1, logits.size(-1)), targets.view(-1), ignore_index=-1)\n",
        "        else:\n",
        "            # inference-time mini-optimization: only forward the lm_head on the very last position\n",
        "            logits = self.lm_head(x[:, [-1], :]) # note: using list [-1] to preserve the time dim\n",
        "            loss = None\n",
        "\n",
        "        return logits, loss\n",
        "\n",
        "    def crop_block_size(self, block_size):\n",
        "        # model surgery to decrease the block size if necessary\n",
        "        # e.g. we may load the GPT2 pretrained model checkpoint (block size 1024)\n",
        "        # but want to use a smaller block size for some smaller, simpler model\n",
        "        assert block_size <= self.config.block_size\n",
        "        self.config.block_size = block_size\n",
        "        self.transformer.wpe.weight = nn.Parameter(self.transformer.wpe.weight[:block_size])\n",
        "        for block in self.transformer.h:\n",
        "            if hasattr(block.attn, 'bias'):\n",
        "                block.attn.bias = block.attn.bias[:,:,:block_size,:block_size]\n",
        "\n",
        "    @classmethod\n",
        "    def from_pretrained(cls, model_type, override_args=None):\n",
        "        assert model_type in {'gpt2', 'gpt2-medium', 'gpt2-large', 'gpt2-xl'}\n",
        "        override_args = override_args or {} # default to empty dict\n",
        "        # only dropout can be overridden see more notes below\n",
        "        assert all(k == 'dropout' for k in override_args)\n",
        "        from transformers import GPT2LMHeadModel\n",
        "        print(\"loading weights from pretrained gpt: %s\" % model_type)\n",
        "\n",
        "        # n_layer, n_head and n_embd are determined from model_type\n",
        "        config_args = {\n",
        "            'gpt2':         dict(n_layer=12, n_head=12, n_embd=768),  # 124M params\n",
        "            'gpt2-medium':  dict(n_layer=24, n_head=16, n_embd=1024), # 350M params\n",
        "            'gpt2-large':   dict(n_layer=36, n_head=20, n_embd=1280), # 774M params\n",
        "            'gpt2-xl':      dict(n_layer=48, n_head=25, n_embd=1600), # 1558M params\n",
        "        }[model_type]\n",
        "        print(\"forcing vocab_size=50257, block_size=1024, bias=True\")\n",
        "        config_args['vocab_size'] = 50257 # always 50257 for GPT model checkpoints\n",
        "        config_args['block_size'] = 1024 # always 1024 for GPT model checkpoints\n",
        "        config_args['bias'] = True # always True for GPT model checkpoints\n",
        "        # we can override the dropout rate, if desired\n",
        "        if 'dropout' in override_args:\n",
        "            print(f\"overriding dropout rate to {override_args['dropout']}\")\n",
        "            config_args['dropout'] = override_args['dropout']\n",
        "        # create a from-scratch initialized minGPT model\n",
        "        config = GPTConfig(**config_args)\n",
        "        model = GPT(config)\n",
        "        sd = model.state_dict()\n",
        "        sd_keys = sd.keys()\n",
        "        sd_keys = [k for k in sd_keys if not k.endswith('.attn.bias')] # discard this mask / buffer, not a param\n",
        "\n",
        "        # init a huggingface/transformers model\n",
        "        model_hf = GPT2LMHeadModel.from_pretrained(model_type)\n",
        "        sd_hf = model_hf.state_dict()\n",
        "\n",
        "        # copy while ensuring all of the parameters are aligned and match in names and shapes\n",
        "        sd_keys_hf = sd_hf.keys()\n",
        "        sd_keys_hf = [k for k in sd_keys_hf if not k.endswith('.attn.masked_bias')] # ignore these, just a buffer\n",
        "        sd_keys_hf = [k for k in sd_keys_hf if not k.endswith('.attn.bias')] # same, just the mask (buffer)\n",
        "        transposed = ['attn.c_attn.weight', 'attn.c_proj.weight', 'mlp.c_fc.weight', 'mlp.c_proj.weight']\n",
        "        # basically the openai checkpoints use a \"Conv1D\" module, but we only want to use a vanilla Linear\n",
        "        # this means that we have to transpose these weights when we import them\n",
        "        assert len(sd_keys_hf) == len(sd_keys), f\"mismatched keys: {len(sd_keys_hf)} != {len(sd_keys)}\"\n",
        "        for k in sd_keys_hf:\n",
        "            if any(k.endswith(w) for w in transposed):\n",
        "                # special treatment for the Conv1D weights we need to transpose\n",
        "                assert sd_hf[k].shape[::-1] == sd[k].shape\n",
        "                with torch.no_grad():\n",
        "                    sd[k].copy_(sd_hf[k].t())\n",
        "            else:\n",
        "                # vanilla copy over the other parameters\n",
        "                assert sd_hf[k].shape == sd[k].shape\n",
        "                with torch.no_grad():\n",
        "                    sd[k].copy_(sd_hf[k])\n",
        "\n",
        "        return model\n",
        "\n",
        "    def configure_optimizers(self, weight_decay, learning_rate, betas, device_type):\n",
        "        # start with all of the candidate parameters\n",
        "        param_dict = {pn: p for pn, p in self.named_parameters()}\n",
        "        # filter out those that do not require grad\n",
        "        param_dict = {pn: p for pn, p in param_dict.items() if p.requires_grad}\n",
        "        # create optim groups. Any parameters that is 2D will be weight decayed, otherwise no.\n",
        "        # i.e. all weight tensors in matmuls + embeddings decay, all biases and layernorms don't.\n",
        "        decay_params = [p for n, p in param_dict.items() if p.dim() >= 2]\n",
        "        nodecay_params = [p for n, p in param_dict.items() if p.dim() < 2]\n",
        "        optim_groups = [\n",
        "            {'params': decay_params, 'weight_decay': weight_decay},\n",
        "            {'params': nodecay_params, 'weight_decay': 0.0}\n",
        "        ]\n",
        "        num_decay_params = sum(p.numel() for p in decay_params)\n",
        "        num_nodecay_params = sum(p.numel() for p in nodecay_params)\n",
        "        print(f\"num decayed parameter tensors: {len(decay_params)}, with {num_decay_params:,} parameters\")\n",
        "        print(f\"num non-decayed parameter tensors: {len(nodecay_params)}, with {num_nodecay_params:,} parameters\")\n",
        "        # Create AdamW optimizer and use the fused version if it is available\n",
        "        fused_available = 'fused' in inspect.signature(torch.optim.AdamW).parameters\n",
        "        use_fused = fused_available and device_type == 'cuda'\n",
        "        extra_args = dict(fused=True) if use_fused else dict()\n",
        "        optimizer = torch.optim.AdamW(optim_groups, lr=learning_rate, betas=betas, **extra_args)\n",
        "        print(f\"using fused AdamW: {use_fused}\")\n",
        "\n",
        "        return optimizer\n",
        "\n",
        "    def estimate_mfu(self, fwdbwd_per_iter, dt):\n",
        "        \"\"\" estimate model flops utilization (MFU) in units of A100 bfloat16 peak FLOPS \"\"\"\n",
        "        # first estimate the number of flops we do per iteration.\n",
        "        # see PaLM paper Appendix B as ref: https://arxiv.org/abs/2204.02311\n",
        "        N = self.get_num_params()\n",
        "        cfg = self.config\n",
        "        L, H, Q, T = cfg.n_layer, cfg.n_head, cfg.n_embd//cfg.n_head, cfg.block_size\n",
        "        flops_per_token = 6*N + 12*L*H*Q*T\n",
        "        flops_per_fwdbwd = flops_per_token * T\n",
        "        flops_per_iter = flops_per_fwdbwd * fwdbwd_per_iter\n",
        "        # express our flops throughput as ratio of A100 bfloat16 peak flops\n",
        "        flops_achieved = flops_per_iter * (1.0/dt) # per second\n",
        "        flops_promised = 312e12 # A100 GPU bfloat16 peak flops is 312 TFLOPS\n",
        "        mfu = flops_achieved / flops_promised\n",
        "        return mfu\n",
        "\n",
        "    @torch.no_grad()\n",
        "    def generate(self, idx, max_new_tokens, temperature=1.0, top_k=None):\n",
        "        \"\"\"\n",
        "        Take a conditioning sequence of indices idx (LongTensor of shape (b,t)) and complete\n",
        "        the sequence max_new_tokens times, feeding the predictions back into the model each time.\n",
        "        Most likely you'll want to make sure to be in model.eval() mode of operation for this.\n",
        "        \"\"\"\n",
        "        for _ in range(max_new_tokens):\n",
        "            # if the sequence context is growing too long we must crop it at block_size\n",
        "            idx_cond = idx if idx.size(1) <= self.config.block_size else idx[:, -self.config.block_size:]\n",
        "            # forward the model to get the logits for the index in the sequence\n",
        "            logits, _ = self(idx_cond)\n",
        "            # pluck the logits at the final step and scale by desired temperature\n",
        "            logits = logits[:, -1, :] / temperature\n",
        "            # optionally crop the logits to only the top k options\n",
        "            if top_k is not None:\n",
        "                v, _ = torch.topk(logits, min(top_k, logits.size(-1)))\n",
        "                logits[logits < v[:, [-1]]] = -float('Inf')\n",
        "            # apply softmax to convert logits to (normalized) probabilities\n",
        "            probs = F.softmax(logits, dim=-1)\n",
        "            # sample from the distribution\n",
        "            idx_next = torch.multinomial(probs, num_samples=1)\n",
        "            # append sampled index to the running sequence and continue\n",
        "            idx = torch.cat((idx, idx_next), dim=1)\n",
        "\n",
        "        return idx\n"
      ],
      "metadata": {
        "id": "52Mv_ufxS9hd"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import os\n",
        "os.path.exists('nanoGPT-songci/data/songci/meta.pkl')"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Pc5tlnFlSjdb",
        "outputId": "6d10ada8-9677-4126-81f1-965ba26ff142"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "True"
            ]
          },
          "metadata": {},
          "execution_count": 3
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "\"\"\"\n",
        "Sample from a trained model\n",
        "\"\"\"\n",
        "import os\n",
        "import pickle\n",
        "from contextlib import nullcontext\n",
        "import torch\n",
        "\n",
        "# -----------------------------------------------------------------------------\n",
        "init_from = 'resume' # either 'resume' (from an out_dir) or a gpt2 variant (e.g. 'gpt2-xl')\n",
        "start = \"\\n\" # or \"<|endoftext|>\" or etc. Can also specify a file, use as: \"FILE:prompt.txt\"\n",
        "num_samples = 10 # number of samples to draw\n",
        "max_new_tokens = 500 # number of tokens generated in each sample\n",
        "temperature = 0.8 # 1.0 = no change, < 1.0 = less random, > 1.0 = more random, in predictions\n",
        "top_k = 200 # retain only the top_k most likely tokens, clamp others to have 0 probability\n",
        "seed = 1337\n",
        "device = 'cuda' # examples: 'cpu', 'cuda', 'cuda:0', 'cuda:1', etc.\n",
        "dtype = 'bfloat16' if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else 'float16' # 'float32' or 'bfloat16' or 'float16'\n",
        "compile = False # use PyTorch 2.0 to compile the model to be faster\n",
        "exec(open('nanoGPT-songci/songci.py').read()) # overrides from command line or config file\n",
        "# -----------------------------------------------------------------------------\n",
        "\n",
        "torch.manual_seed(seed)\n",
        "torch.cuda.manual_seed(seed)\n",
        "torch.backends.cuda.matmul.allow_tf32 = True # allow tf32 on matmul\n",
        "torch.backends.cudnn.allow_tf32 = True # allow tf32 on cudnn\n",
        "device_type = 'cuda' if 'cuda' in device else 'cpu' # for later use in torch.autocast\n",
        "ptdtype = {'float32': torch.float32, 'bfloat16': torch.bfloat16, 'float16': torch.float16}[dtype]\n",
        "ctx = nullcontext() if device_type == 'cpu' else torch.amp.autocast(device_type=device_type, dtype=ptdtype)\n",
        "print(device)\n",
        "# model\n",
        "if init_from == 'resume':\n",
        "    # init from a model saved in a specific directory\n",
        "    ckpt_path = os.path.join('nanoGPT-songci', 'ckpt.pt')\n",
        "    checkpoint = torch.load(ckpt_path, map_location=device)\n",
        "    gptconf = GPTConfig(**checkpoint['model_args'])\n",
        "    model = GPT(gptconf)\n",
        "    state_dict = checkpoint['model']\n",
        "    unwanted_prefix = '_orig_mod.'\n",
        "    for k,v in list(state_dict.items()):\n",
        "        if k.startswith(unwanted_prefix):\n",
        "            state_dict[k[len(unwanted_prefix):]] = state_dict.pop(k)\n",
        "    model.load_state_dict(state_dict)\n",
        "elif init_from.startswith('gpt2'):\n",
        "    # init from a given GPT-2 model\n",
        "    model = GPT.from_pretrained(init_from, dict(dropout=0.0))\n",
        "\n",
        "model.eval()\n",
        "model.to(device)\n",
        "if compile:\n",
        "    model = torch.compile(model) # requires PyTorch 2.0 (optional)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "B1rwyLZn6tAZ",
        "outputId": "98ac8238-2675-469c-ac29-47551d895b74"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "cuda\n",
            "number of parameters: 89.67M\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "print(decode(model.generate(idx = torch.zeros((1, 1), dtype=torch.long, device=device), max_new_tokens=2000)[0].tolist()))"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "zuP5eJaLSzAW",
        "outputId": "e192a0d5-d2bc-498a-9ba9-4e2d1f49c05b"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "漫把征衫，一洗愁新月。\n",
            "征尘亭下，重见旧时节。\n",
            "湘风吹裂湔裙，破日新凉后。\n",
            "惊起不知灯火悄。\n",
            "无人见。\n",
            "翠衾鸳枕，争奈游人老。\n",
            "\n",
            "赵令畤\n",
            "醉蓬莱\n",
            "倚春残梦，腾腾一霎迢迢殿。\n",
            "东风似洗。\n",
            "映深深院，檐梢煎馥。\n",
            "残雨令人路。\n",
            "心事啼鸦妥处，啼莺怨、不记却好。\n",
            "劝一片、春风几曾深，归禽款。\n",
            "\n",
            "吴潜\n",
            "谒金门\n",
            "风漠漠。\n",
            "红碧紫荷分远。\n",
            "柳下青蓑风树。\n",
            "常是花如无觅处。\n",
            "摘花数点云垂幕。\n",
            "是处梅仙相应少。\n",
            "不见岭边苏小。\n",
            "过尽月明黄陨泪。\n",
            "惊倒沙头，晚来一笑。\n",
            "\n",
            "贺铸\n",
            "画桥鱼・踏青游\n",
            "短艇南来，撑舟一带秋江岸。\n",
            "晚风吹起，又惊征叶，做我黄花啼绿。\n",
            "几度敲霜，宛如琼鉴，韩旋风光老。\n",
            "故人为我，更几番疏暑。\n",
            "一洗清香喷水。\n",
            "\n",
            "陈允平\n",
            "蝶恋花\n",
            "塞管吹人云影卷。\n",
            "将倦西窗，几处吹人顾。\n",
            "倚遍黄昏梦不断。\n",
            "情多恨、几度音书语。\n",
            "凄凉清夜前情绪。\n",
            "孤馆闲窗人散后。\n",
            "当年只在手围红，牵惹闲愁双脸燕。\n",
            "\n",
            "史达祖\n",
            "蝶恋花\n",
            "帘幕横云人未定。\n",
            "倚扇踏青，动日烘帘户。\n",
            "鸾镜尘生春意静。\n",
            "目断碧云花正暖。\n",
            "凤钗绣韵浓如旧。\n",
            "竹叶香沈，别后慵移笑。\n",
            "花下清风谁道酒。\n",
            "惆怅可恨人千里。\n",
            "\n",
            "曹勋\n",
            "凤箫吟・凤州慢\n",
            "戏袍春昼永，冷杨深、玫琤初转。\n",
            "玉痕何处，天丝莹郁，金叶同心避。\n",
            "何处解幽芳，近人昼永，特地多情，长如春色。\n",
            "莫管折枝，为春且容，拆多情味。\n",
            "待得东君，无穷与花，不管香苞嫩，有桃枝解。\n",
            "\n",
            "无名氏\n",
            "江城子\n",
            "一枝灯影泪珠钱。\n",
            "雨轻风。\n",
            "却道人间情不会，道人生是客番寒。\n",
            "\n",
            "无名氏\n",
            "鹧鸪天\n",
            "彤阙神仙阆苑春。\n",
            "鼻观宫殿望千宫。\n",
            "仙子却齐民。\n",
            "一堂擎耀┾奇域，借作寰波去住章。\n",
            "\n",
            "张纲\n",
            "鹧鸪天\n",
            "蜡楮熏边晓翠藤。\n",
            "十分圆此记仙人。\n",
            "太平更觉香英泄，小殿人间普瑞浓。\n",
            "雕轮启入未烧灯。\n",
            "珠卷玉壶薰殿暗，金尊更爇蒸时。\n",
            "披衣入醉不须天。\n",
            "\n",
            "张抡\n",
            "浣溪沙\n",
            "娉婷如箭陆王宫。\n",
            "却将尘世两俱非。\n",
            "清润不多方是味，施朱匀白太愁人。\n",
            "杯中一味已添频。\n",
            "直须遐算莫因缘。\n",
            "小会百年模样面，宁为寿君同。\n",
            "\n",
            "王之道\n",
            "好事近\n",
            "桃叶乱馀寒，摇落紫金枝蜡。\n",
            "忽过梨花深处，却问便无人处。\n",
            "已觉一春心事，应弄铁成愁赋。\n",
            "只愁多怨入离情，背立倚衣腰，总是空无色。\n",
            "\n",
            "无名氏\n",
            "好事近\n",
            "小雨不禁寒，清於春思僝僽。\n",
            "恨不教人来，病却整罗衣线。\n",
            "偷许奈愁苦。\n",
            "天与阿容风露，一般波色嫌谁与。\n",
            "更道傅粉拨妆须，鬓边眉绿，半抵梳掠。\n",
            "一番百花耳。\n",
            "相逢消却笑，半空倚、独把春风分付。\n",
            "\n",
            "赵长卿\n",
            "水调歌头\n",
            "大夫不暇，我舍重来官府仙。\n",
            "富贵当年，应只赋、对景有佳人。\n",
            "缥缈灵台金阙，听得隙头陀帅，何事天长天籁，怪得飞仙飞霹雳，鹭者一华惊不到埃。\n",
            "始修真，殊不寐，天也铅华。\n",
            "\n",
            "宋先生\n",
            "临江仙\n",
            "谨劝拦新春昼暮，萧然自唱阳关。\n",
            "片帆醉墨酒初醒。\n",
            "人不到，身不定，浪形难。\n",
            "兀如今。\n",
            "儿前犹是，老子想鲲偕。\n",
            "暮年清胜，人应未破没华余。\n",
            "\n",
            "赵德武\n",
            "太清舞\n",
            "风流不用钱塘老，渺渺送鸿鸿。\n",
            "渺渺心田千丈，顷波远照空观。\n",
            "乌帽几毛破。\n",
            "下林江，披汗泪，壮怀同。\n",
            "破帽苍苔无底。\n",
            "叹处滋味密寄幽，独忘珠泪。\n",
            "忽无羽翼时有，更莫待、春风里。\n",
            "\n",
            "文学箕\n",
            "清平乐\n",
            "燕巾缟袂。\n",
            "柳摇新湿。\n",
            "髻影摇新尺。\n",
            "一镜碧千双玉。\n",
            "妙舞风和小砑。\n",
            "千山暮雨伤心远。\n",
            "归笑又无诗句。\n",
            "鬓影远山眉上。\n",
            "\n",
            "陈师道\n",
            "鹊桥仙\n",
            "每逢幽会，为谁来是后，初登佳节。\n",
            "青箱织就不禁愁，轻衫短帽，彩笔春衫袖细。\n",
            "无言有、双黛蹙修蛾，才远思，倚遍香车，永和露岑人寂。\n",
            "\n",
            "高观国\n",
            "小重山\n",
            "断续青山远目平。\n",
            "一中离恨满江流。\n",
            "东皇虽旧今春恨，红满是、鬓晏香浓。\n",
            "岸草水平亭陌外，杏花阴院有无愁。\n",
            "多病厌厌眼病，临风又满，老去殢芳辰。\n",
            "\n",
            "王质\n",
            "沁园春\n",
            "魏紫姚黄，春入仙衣，总是长年。\n",
            "把玉奴妆鉴，水外春风，争忍轻分。\n",
            "知东君酿取，吴笺粉室，触目神仙。\n",
            "我本是常相识，老眼难为。\n",
            "百年豪气，身与清香独自，为我更须同。\n",
            "自是人生缘荡，何必留连计忙。\n",
            "且向壶中酒，免我从头。\n",
            "\n",
            "辛弃疾\n",
            "沁园春\n",
            "且免人生，何处有归。\n",
            "但有玉堂书剑，奔驰笔尹，玉堂八叶，远管他年。\n",
            "那得坡前，倒舟白鹭，直到万里名征。\n",
            "问过如何，更是羲皇百亩，任万里关心。\n",
            "功名事，旧曾同静，此去无心休吝，听壁谁听。\n",
            "\n",
            "辛弃疾\n",
            "鹧鸪天\n",
            "左国连环大了长。\n",
            "秋水溶溶白没尘。\n",
            "松根相应无底事，淹逼嫌云便却宜。\n",
            "此身虽解有言时。\n",
            "分扫却无游意底，空把尘埃。\n",
            "趁到明朝比薄罗。\n",
            "\n",
            "刘克庄\n",
            "满江红\n",
            "华社推移，羁思杳、江南塞北。\n",
            "谁满地、琼楼玉角，醉歌千百。\n",
            "一曲黄尘惊捷笔，不许栖山心后。\n",
            "笑指青山，今不老，对吴头白。\n",
            "吾台水畔，应把元龙憔悴。\n",
            "论情铄笔何益。\n",
            "闻说当时己，自个坎止。\n",
            "歌罢喧藏鸡鼓枻，风流景、推入华棋蹙。\n",
            "昵供我，痴儿拍处休欢悦。\n",
            "将处做，欲飞去。\n",
            "物华宁尔归去也，便醉乡、共感侪痴绝。\n",
            "\n",
            "魏了翁\n",
            "满江红\n",
            "满路花边，携筇过、不妨行客。\n",
            "颇未足、单于安节，色行无俗。\n",
            "华屋人情\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "dvPg5gjuTnN6"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}